X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fcontrol.c;h=4c0ab511b376a9aa955b340dfe799715ce0cba38;hb=0fe69908838248c28624beb540257892db6bdcbd;hp=fc713c8b95c4393807d54d3d168d2c3e86fb8e70;hpb=95baa36f10743d4d2bd6f6ff05457f77bd14e96d;p=tinc diff --git a/src/control.c b/src/control.c index fc713c8b..4c0ab511 100644 --- a/src/control.c +++ b/src/control.c @@ -18,13 +18,10 @@ */ #include "system.h" -#include "crypto.h" #include "conf.h" #include "control.h" #include "control_common.h" -#include "graph.h" #include "logger.h" -#include "meta.h" #include "names.h" #include "net.h" #include "netutl.h" @@ -32,6 +29,7 @@ #include "route.h" #include "utils.h" #include "xalloc.h" +#include "random.h" char controlcookie[65]; @@ -110,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; } @@ -187,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) { @@ -234,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);