diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-01 21:52:47 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-01 21:52:47 +0200 |
commit | 415020dcc33bf136f09f2d8d8a3dc38452e71c84 (patch) | |
tree | 3d7dd2a5905b56aa16408388eb0d4a19698076a3 | |
parent | 9225a4550abebd26ff3642d8f5ed4f96b2e4bff7 (diff) | |
download | fastd-415020dcc33bf136f09f2d8d8a3dc38452e71c84.tar fastd-415020dcc33bf136f09f2d8d8a3dc38452e71c84.zip |
Ensure peer add/delete messages are printed for the same peers
-rw-r--r-- | src/peer.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |