projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct close() function when building with MSVC
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
c700f94
..
5ae76d3
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-644,7
+644,7
@@
static bool stop_tincd(void) {
// wait for tincd to close the connection...
}
// wait for tincd to close the connection...
}
- close(fd);
+ close
socket
(fd);
pid = 0;
fd = -1;
pid = 0;
fd = -1;
@@
-717,7
+717,7
@@
bool connect_tincd(bool verbose) {
if(select(fd + 1, &r, NULL, NULL, &tv)) {
fprintf(stderr, "Previous connection to tincd lost, reconnecting.\n");
if(select(fd + 1, &r, NULL, NULL, &tv)) {
fprintf(stderr, "Previous connection to tincd lost, reconnecting.\n");
- close(fd);
+ close
socket
(fd);
fd = -1;
} else {
return true;
fd = -1;
} else {
return true;
@@
-784,7
+784,7
@@
bool connect_tincd(bool verbose) {
fprintf(stderr, "Cannot connect to UNIX socket %s: %s\n", unixsocketname, sockstrerror(sockerrno));
}
fprintf(stderr, "Cannot connect to UNIX socket %s: %s\n", unixsocketname, sockstrerror(sockerrno));
}
- close(fd);
+ close
socket
(fd);
fd = -1;
return false;
}
fd = -1;
return false;
}
@@
-830,7
+830,7
@@
bool connect_tincd(bool verbose) {
fprintf(stderr, "Cannot connect to %s port %s: %s\n", host, port, sockstrerror(sockerrno));
}
fprintf(stderr, "Cannot connect to %s port %s: %s\n", host, port, sockstrerror(sockerrno));
}
- close(fd);
+ close
socket
(fd);
fd = -1;
return false;
}
fd = -1;
return false;
}
@@
-853,7
+853,7
@@
bool connect_tincd(bool verbose) {
fprintf(stderr, "Cannot read greeting from control socket: %s\n", sockstrerror(sockerrno));
}
fprintf(stderr, "Cannot read greeting from control socket: %s\n", sockstrerror(sockerrno));
}
- close(fd);
+ close
socket
(fd);
fd = -1;
return false;
}
fd = -1;
return false;
}
@@
-863,7
+863,7
@@
bool connect_tincd(bool verbose) {
fprintf(stderr, "Could not fully establish control socket connection\n");
}
fprintf(stderr, "Could not fully establish control socket connection\n");
}
- close(fd);
+ close
socket
(fd);
fd = -1;
return false;
}
fd = -1;
return false;
}
@@
-1528,7
+1528,7
@@
static int cmd_log(int argc, char *argv[]) {
signal(SIGINT, SIG_DFL);
#endif
signal(SIGINT, SIG_DFL);
#endif
- close(fd);
+ close
socket
(fd);
fd = -1;
return 0;
}
fd = -1;
return 0;
}
@@
-2623,7
+2623,7
@@
static int switch_network(char *name) {
}
if(fd >= 0) {
}
if(fd >= 0) {
- close(fd);
+ close
socket
(fd);
fd = -1;
}
fd = -1;
}