summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-01 21:52:47 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-01 21:52:47 +0200
commit415020dcc33bf136f09f2d8d8a3dc38452e71c84 (patch)
tree3d7dd2a5905b56aa16408388eb0d4a19698076a3 /src/peer.c
parent9225a4550abebd26ff3642d8f5ed4f96b2e4bff7 (diff)
downloadfastd-415020dcc33bf136f09f2d8d8a3dc38452e71c84.tar
fastd-415020dcc33bf136f09f2d8d8a3dc38452e71c84.zip
Ensure peer add/delete messages are printed for the same peers
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c5
1 files changed, 3 insertions, 2 deletions
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;