From: Niklas Hofmann Date: Sat, 9 Aug 2014 18:14:01 +0000 (+0200) Subject: added log info X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=93ede0a8015fbe09968544961b7ac23a12e1a534 added log info --- 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