X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet_socket.c;h=0639478102df0d6cbe8ff47d69fac7809a611230;hb=48c87b045ff3143f369c96208b7b318352d309f8;hp=d5786e5bc24c15be129f0abe508326ca90b0459a;hpb=ae1d95cee66f3e5c6475f03b441d455e436e9ee8;p=meshlink diff --git a/src/net_socket.c b/src/net_socket.c index d5786e5b..06394781 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -36,6 +36,10 @@ #define SOL_TCP IPPROTO_TCP #endif +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif + int addressfamily = AF_UNSPEC; int seconds_till_retry = 5; int max_connection_burst = 100; @@ -518,6 +522,7 @@ void setup_outgoing_connection(meshlink_handle_t *mesh, outgoing_t *outgoing) { return; } + exit_configuration(&outgoing->config_tree); // discard old configuration if present init_configuration(&outgoing->config_tree); read_host_config(mesh, outgoing->config_tree, outgoing->name); outgoing->cfg = lookup_config(outgoing->config_tree, "Address");