X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet_setup.c;h=10fb37b0005c5df5ae73b35bf33a66a9591796ac;hb=b5a8aaba0ae78e93f8a972c9c7911fc2bc664b4e;hp=f2621f3b92e6f87c0f2afcbcbf742b4ba22f7aa6;hpb=dc0e52cb3e42620c3139e713b373d130aa30b698;p=meshlink diff --git a/src/net_setup.c b/src/net_setup.c index f2621f3b..10fb37b0 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -274,6 +274,7 @@ static bool add_listen_address(meshlink_handle_t *mesh, char *address, bool bind } struct addrinfo *ai; + struct addrinfo hint = { .ai_family = addressfamily, .ai_socktype = SOCK_STREAM, @@ -364,8 +365,11 @@ bool setup_myself(meshlink_handle_t *mesh) { if(!get_config_string(lookup_config(mesh->config, "Port"), &mesh->myport)) { int port = check_port(mesh); - if (port == 0) + + if(port == 0) { return false; + } + xasprintf(&mesh->myport, "%d", port); }