X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet_socket.c;h=a6adb2a61a6cb75f3dc5e833e88d76af6ae0eeec;hb=3268e9a2b9fea6779224fe1f3da48b7fc4b9cb46;hp=4ef7eb0c9aa0ebaf6ccaa16411d67c41bfe38c79;hpb=cf3f161b0cbe847a484ea2c4fb215b963acbb805;p=meshlink diff --git a/src/net_socket.c b/src/net_socket.c index 4ef7eb0c..a6adb2a6 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -319,7 +319,7 @@ static void handle_meta_write(meshlink_handle_t *mesh, connection_t *c) { logger(DEBUG_CONNECTIONS, LOG_ERR, "Could not send %d bytes of data to %s (%s): %s", c->outbuf.len - c->outbuf.offset, c->name, c->hostname, strerror(errno)); } - terminate_connection(c, c->status.active); + terminate_connection(mesh, c, c->status.active); return; } @@ -343,7 +343,7 @@ static void handle_meta_io(event_loop_t *loop, void *data, int flags) { finish_connecting(mesh, c); else { logger(DEBUG_CONNECTIONS, LOG_DEBUG, "Error while connecting to %s (%s): %s", c->name, c->hostname, sockstrerror(result)); - terminate_connection(c, false); + terminate_connection(mesh, c, false); return; } } @@ -351,7 +351,7 @@ static void handle_meta_io(event_loop_t *loop, void *data, int flags) { if(flags & IO_WRITE) handle_meta_write(mesh, c); else - handle_meta_connection_data(c); + handle_meta_connection_data(mesh, c); } bool do_outgoing_connection(meshlink_handle_t *mesh, outgoing_t *outgoing) { @@ -690,7 +690,7 @@ void try_outgoing_connections(meshlink_handle_t *mesh) { if(c->outgoing && c->outgoing->timeout == -1) { c->outgoing = NULL; logger(DEBUG_CONNECTIONS, LOG_INFO, "No more outgoing connection to %s", c->name); - terminate_connection(c, c->status.active); + terminate_connection(mesh, c, c->status.active); } }