summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-11-10 15:20:39 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-11-10 15:20:39 +0100
commit6ef24092b52b717242f52b18a2f1ee9d44ed2f4e (patch)
tree897ca4e056ccc10859a82f71beaa85f01d952668 /src/peer.c
parent13c71785b58fe542ca95eeed11dabf99f1be71fa (diff)
downloadfastd-6ef24092b52b717242f52b18a2f1ee9d44ed2f4e.tar
fastd-6ef24092b52b717242f52b18a2f1ee9d44ed2f4e.zip
Keep track of configured peer count correctly on dynamic reloads
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/peer.c b/src/peer.c
index 9624fd5..e2ddf22 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -288,6 +288,7 @@ static void delete_peer(fastd_context *ctx, fastd_peer *peer) {
ctx->conf->protocol->free_peer_state(ctx, peer);
free(peer);
+ ctx->n_peers--;
}
@@ -474,6 +475,7 @@ fastd_peer* fastd_peer_add(fastd_context *ctx, fastd_peer_config *peer_conf) {
setup_peer(ctx, peer);
pr_verbose(ctx, "adding peer %P (group `%s')", peer, peer->group->conf->name);
+ ctx->n_peers++;
return peer;
}