projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor crypto RNG; add getrandom() support
[tinc]
/
src
/
control.c
diff --git
a/src/control.c
b/src/control.c
index
6e2a7f3
..
4c0ab51
100644
(file)
--- a/
src/control.c
+++ b/
src/control.c
@@
-18,7
+18,6
@@
*/
#include "system.h"
*/
#include "system.h"
-#include "crypto.h"
#include "conf.h"
#include "control.h"
#include "control_common.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 "route.h"
#include "utils.h"
#include "xalloc.h"
+#include "random.h"
char controlcookie[65];
char controlcookie[65];
@@
-108,7
+108,7
@@
bool control_h(connection_t *c, const char *request) {
return control_return(c, REQ_DISCONNECT, -1);
}
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;
}
if(strcmp(other->name, name)) {
continue;
}
@@
-185,7
+185,7
@@
bool init_control(void) {
free(localhost);
fclose(f);
free(localhost);
fclose(f);
-#ifndef HAVE_
MINGW
+#ifndef HAVE_
WINDOWS
int unix_fd = socket(AF_UNIX, SOCK_STREAM, 0);
if(unix_fd < 0) {
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) {
}
void exit_control(void) {
-#ifndef HAVE_
MINGW
+#ifndef HAVE_
WINDOWS
unlink(unixsocketname);
io_del(&unix_socket);
close(unix_socket.fd);
unlink(unixsocketname);
io_del(&unix_socket);
close(unix_socket.fd);