diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_edge.c | 5 | ||||
-rw-r--r-- | src/or/cpuworker.c | 6 | ||||
-rw-r--r-- | src/or/dns.c | 6 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 73be5e936..8df2f55da 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1207,12 +1207,13 @@ connection_ap_make_bridge(char *address, uint16_t port) { int fd[2]; connection_t *conn; + int err; log_fn(LOG_INFO,"Making AP bridge to %s:%d ...",safe_str(address),port); - if (tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) { + if ((err = tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) < 0) { log(LOG_WARN,"Couldn't construct socketpair (%s). Network down? Delaying.", - tor_socket_strerror(tor_socket_errno(-1))); + tor_socket_strerror(-err)); return -1; } diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index bcc50c06f..eb264bfcf 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -301,11 +301,11 @@ spawn_cpuworker(void) int *fdarray; int fd; connection_t *conn; + int err; fdarray = tor_malloc(sizeof(int)*2); - if (tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray) < 0) { - log(LOG_ERR, "Couldn't construct socketpair: %s", - tor_socket_strerror(tor_socket_errno(-1))); + if ((err = tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray)) < 0) { + log(LOG_ERR, "Couldn't construct socketpair: %s", tor_socket_strerror(-err)); tor_cleanup(); tor_free(fdarray); exit(1); diff --git a/src/or/dns.c b/src/or/dns.c index 5915d950d..41e7bb83b 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -824,11 +824,11 @@ spawn_dnsworker(void) int *fdarray; int fd; connection_t *conn; + int err; fdarray = tor_malloc(sizeof(int)*2); - if (tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray) < 0) { - log(LOG_ERR, "Couldn't construct socketpair: %s", - tor_socket_strerror(tor_socket_errno(-1))); + if ((err = tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray)) < 0) { + log(LOG_ERR, "Couldn't construct socketpair: %s", tor_socket_strerror(-err)); tor_cleanup(); tor_free(fdarray); exit(1); |