X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fcontrol.c;h=4c0ab511b376a9aa955b340dfe799715ce0cba38;hb=0fe69908838248c28624beb540257892db6bdcbd;hp=6e2a7f329102280c557009e0daf823ca86046034;hpb=1545909dcb3ac618754486f4ccd4d8f237d64bb7;p=tinc diff --git a/src/control.c b/src/control.c index 6e2a7f32..4c0ab511 100644 --- a/src/control.c +++ b/src/control.c @@ -18,7 +18,6 @@ */ #include "system.h" -#include "crypto.h" #include "conf.h" #include "control.h" #include "control_common.h" @@ -30,6 +29,7 @@ #include "route.h" #include "utils.h" #include "xalloc.h" +#include "random.h" char controlcookie[65]; @@ -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);