From 415020dcc33bf136f09f2d8d8a3dc38452e71c84 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 1 Sep 2014 21:52:47 +0200 Subject: Ensure peer add/delete messages are printed for the same peers --- src/peer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/peer.c b/src/peer.c index 1fefa33..30cc52f 100644 --- a/src/peer.c +++ b/src/peer.c @@ -439,7 +439,8 @@ void fastd_peer_free(fastd_peer_t *peer) { /** Deletes a peer */ static void delete_peer(fastd_peer_t *peer) { - pr_verbose("deleting peer %P", peer); + if (fastd_peer_is_dynamic(peer) || peer->config_source_dir) + pr_verbose("deleting peer %P", peer); size_t i = peer_index(peer); VECTOR_DELETE(ctx.peers, i); @@ -742,7 +743,7 @@ bool fastd_peer_add(fastd_peer_t *peer) { conf.protocol->init_peer_state(peer); - if (!fastd_peer_is_dynamic(peer) && peer->config_source_dir) + if (fastd_peer_is_dynamic(peer) || peer->config_source_dir) pr_verbose("adding peer %P", peer); return true; -- cgit v1.2.3