X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fcontrol.c;h=86e0f68a11cb358ae10a21a2f122ee323e7594de;hb=ee988a6e3758994cb0552ef17f872e2530e7ceff;hp=6e2a7f329102280c557009e0daf823ca86046034;hpb=1545909dcb3ac618754486f4ccd4d8f237d64bb7;p=tinc diff --git a/src/control.c b/src/control.c index 6e2a7f32..86e0f68a 100644 --- a/src/control.c +++ b/src/control.c @@ -108,7 +108,7 @@ bool control_h(connection_t *c, const char *request) { return control_return(c, REQ_DISCONNECT, -1); } - for list_each(connection_t, other, connection_list) { + for list_each(connection_t, other, &connection_list) { if(strcmp(other->name, name)) { continue; } @@ -185,7 +185,7 @@ bool init_control(void) { free(localhost); fclose(f); -#ifndef HAVE_MINGW +#ifndef HAVE_WINDOWS int unix_fd = socket(AF_UNIX, SOCK_STREAM, 0); if(unix_fd < 0) { @@ -232,7 +232,7 @@ bool init_control(void) { } void exit_control(void) { -#ifndef HAVE_MINGW +#ifndef HAVE_WINDOWS unlink(unixsocketname); io_del(&unix_socket); close(unix_socket.fd);