summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection.c6
-rw-r--r--src/or/connection_edge.c3
-rw-r--r--src/or/cpuworker.c3
-rw-r--r--src/or/dns.c3
-rw-r--r--src/or/main.c3
5 files changed, 11 insertions, 7 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 6f69799cd2..9b3100e0f4 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -279,13 +279,13 @@ int connection_create_listener(char *bindaddress, uint16_t bindport, int type) {
if(bind(s,(struct sockaddr *)&bindaddr,sizeof(bindaddr)) < 0) {
log_fn(LOG_WARN,"Could not bind to port %u: %s",bindport,
- strerror(tor_socket_errno(s)));
+ tor_socket_strerror(tor_socket_errno(s)));
return -1;
}
if(listen(s,SOMAXCONN) < 0) {
log_fn(LOG_WARN,"Could not listen on port %u: %s",bindport,
- strerror(tor_socket_errno(s)));
+ tor_socket_strerror(tor_socket_errno(s)));
return -1;
}
@@ -392,7 +392,7 @@ int connection_connect(connection_t *conn, char *address, uint32_t addr, uint16_
if(!ERRNO_IS_CONN_EINPROGRESS(tor_socket_errno(s))) {
/* yuck. kill it. */
log_fn(LOG_INFO,"Connect() to %s:%u failed: %s",address,port,
- strerror(tor_socket_errno(s)));
+ tor_socket_strerror(tor_socket_errno(s)));
tor_close_socket(s);
return -1;
} else {
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 7a9bdfd0a3..d4dd2d42ea 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1067,7 +1067,8 @@ int connection_ap_make_bridge(char *address, uint16_t port) {
log_fn(LOG_INFO,"Making AP bridge to %s:%d ...",address,port);
if(tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) {
- log(LOG_WARN, "Couldn't construct socketpair (%s). Network down? Delaying.", strerror(errno));
+ log(LOG_WARN,"Couldn't construct socketpair (%s). Network down? Delaying.",
+ tor_socket_strerror(tor_socket_errno(-1)));
return -1;
}
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index fb5a9d85a7..92a0ed8881 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -214,7 +214,8 @@ static int spawn_cpuworker(void) {
connection_t *conn;
if(tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) {
- log(LOG_ERR, "Couldn't construct socketpair: %s", strerror(errno));
+ log(LOG_ERR, "Couldn't construct socketpair: %s",
+ tor_socket_strerror(tor_socket_errno(-1)));
exit(1);
}
diff --git a/src/or/dns.c b/src/or/dns.c
index 2cb4cb6182..18cfea3248 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -503,7 +503,8 @@ static int spawn_dnsworker(void) {
connection_t *conn;
if(tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) {
- log(LOG_ERR, "Couldn't construct socketpair: %s", strerror(errno));
+ log(LOG_ERR, "Couldn't construct socketpair: %s",
+ tor_socket_strerror(tor_socket_errno(-1)));
exit(1);
}
diff --git a/src/or/main.c b/src/or/main.c
index 836f4d665b..cc3789e85c 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -656,7 +656,8 @@ static int do_main_loop(void) {
/* let the program survive things like ^z */
if(tor_socket_errno(-1) != EINTR) {
log_fn(LOG_ERR,"poll failed: %s [%d]",
- strerror(tor_socket_errno(-1)), tor_socket_errno(-1));
+ tor_socket_strerror(tor_socket_errno(-1)),
+ tor_socket_errno(-1));
return -1;
} else {
log_fn(LOG_DEBUG,"poll interrupted.");