X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_socket.c;h=09c5207034ca10c2fc7e790e54ce495e03f7c9ae;hb=3254e75afe0ff28fed68d8682f61c184f442161d;hp=df6f3c048e78d81e00ed93f2d62627e44ee650c2;hpb=b346338f9c2de6f71d87cb4ad8e61b0af0052688;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index df6f3c04..09c52070 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -63,7 +63,7 @@ static void configure_tcp(connection_t *c) { unsigned long arg = 1; if(ioctlsocket(c->socket, FIONBIO, &arg) != 0) { - logger(DEBUG_ALWAYS, LOG_ERR, "ioctlsocket for %s: %d", c->hostname, sockstrerror(sockerrno)); + logger(DEBUG_ALWAYS, LOG_ERR, "ioctlsocket for %s: %s", c->hostname, sockstrerror(sockerrno)); } #endif @@ -555,7 +555,7 @@ void handle_new_meta_connection(int sock, short events, void *data) { event_set(&c->inevent, c->socket, EV_READ | EV_PERSIST, handle_meta_connection_data, c); event_set(&c->outevent, c->socket, EV_WRITE | EV_PERSIST, handle_meta_write, c); event_add(&c->inevent, NULL); - + configure_tcp(c); connection_add(c); @@ -571,6 +571,9 @@ static void free_outgoing(outgoing_t *outgoing) { if(outgoing->ai) freeaddrinfo(outgoing->ai); + if(outgoing->config_tree) + exit_configuration(&outgoing->config_tree); + if(outgoing->name) free(outgoing->name);