X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;h=2d1ecc50e83f40ed5d03590e49a8a7a6e6e13182;hp=457392ef21df53bd479f9e20c0d9f683b4663c10;hb=8793fb7d43161f4d5358ff73b7a4937ad7e642e2;hpb=5ae19cb0bb8dd6be1e9bcd560bb051f496a373ec diff --git a/src/net_socket.c b/src/net_socket.c index 457392ef..2d1ecc50 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -346,13 +346,13 @@ static void do_outgoing_pipe(connection_t *c, char *command) { exit(result); #else logger(LOG_ERR, "Proxy type exec not supported on this platform!"); - return false; + return; #endif } void do_outgoing_connection(connection_t *c) { char *address, *port, *space; - struct addrinfo *proxyai; + struct addrinfo *proxyai = NULL; int result; if(!c->outgoing) { @@ -411,9 +411,9 @@ begin: if(!proxytype) { c->socket = socket(c->address.sa.sa_family, SOCK_STREAM, IPPROTO_TCP); configure_tcp(c); - } if(proxytype == PROXY_EXEC) { + } else if(proxytype == PROXY_EXEC) { do_outgoing_pipe(c, proxyhost); - } else { + } else { proxyai = str2addrinfo(proxyhost, proxyport, SOCK_STREAM); if(!proxyai) goto begin;