From 93ede0a8015fbe09968544961b7ac23a12e1a534 Mon Sep 17 00:00:00 2001 From: Niklas Hofmann Date: Sat, 9 Aug 2014 20:14:01 +0200 Subject: [PATCH] added log info --- src/net.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index 594d4bf8..ed129245 100644 --- a/src/net.c +++ b/src/net.c @@ -261,6 +261,9 @@ static void periodic_handler(event_loop_t *loop, void *data) { } bool satisfied = dclass_ccounts_satisfied(mesh->self->dclass, ccounts, num_total); + int maxcc = max_ccount_from_dclass(mesh->self->dclass); + + logger(mesh, MESHLINK_INFO, "* num_total = %d, satisfied = %d, maxcc = %d", num_total, satisfied, maxcc); if(!satisfied) { logger(mesh, MESHLINK_INFO, "* Not enough active connections, try to add one."); @@ -281,7 +284,7 @@ static void periodic_handler(event_loop_t *loop, void *data) { cond_add_connection(mesh, num_unreachable, &found_random_unreachable_node); } - if(num_total > max_ccount_from_dclass(mesh->self->dclass)) { + if(num_total > maxcc) { logger(mesh, MESHLINK_INFO, "* Too many active connections, try to remove one."); /* Too many active connections, try to remove one. Choose a random outgoing connection to a node -- 2.39.5