X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet.c;h=8e5c2c1830ee3b489d73314606042734b978f4c5;hb=ea294dac41365a08a77b64c62c0ba630292d7a07;hp=45a9abbfea363c37e9d099b9307fc2085fecdc7b;hpb=5c5bdd05e17f8758e2ccca9d31c47d73cb1fd148;p=meshlink diff --git a/src/net.c b/src/net.c index 45a9abbf..8e5c2c18 100644 --- a/src/net.c +++ b/src/net.c @@ -47,7 +47,7 @@ static const int min(int a, int b) { - Check if we need to retry making an outgoing connection */ void terminate_connection(meshlink_handle_t *mesh, connection_t *c, bool report) { - logger(mesh, MESHLINK_INFO, "Closing connection with %s (%s)", c->name, c->hostname); + logger(mesh, MESHLINK_INFO, "Closing connection with %s", c->name); c->status.active = false; @@ -113,7 +113,7 @@ static void timeout_handler(event_loop_t *loop, void *data) { if(c->last_ping_time + mesh->pingtimeout <= mesh->loop.now.tv_sec) { if(c->status.active) { if(c->status.pinged) - logger(mesh, MESHLINK_INFO, "%s (%s) didn't respond to PING in %ld seconds", c->name, c->hostname, (long)mesh->loop.now.tv_sec - c->last_ping_time); + logger(mesh, MESHLINK_INFO, "%s didn't respond to PING in %ld seconds", c->name, (long)mesh->loop.now.tv_sec - c->last_ping_time); else if(c->last_ping_time + mesh->pinginterval <= mesh->loop.now.tv_sec) { send_ping(mesh, c); continue; @@ -121,9 +121,9 @@ static void timeout_handler(event_loop_t *loop, void *data) { continue; } else { if(c->status.connecting) - logger(mesh, MESHLINK_WARNING, "Timeout while connecting to %s (%s)", c->name, c->hostname); + logger(mesh, MESHLINK_WARNING, "Timeout while connecting to %s", c->name); else - logger(mesh, MESHLINK_WARNING, "Timeout from %s (%s) during authentication", c->name, c->hostname); + logger(mesh, MESHLINK_WARNING, "Timeout from %s during authentication", c->name); } terminate_connection(mesh, c, c->status.active); }