aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/connection_edge.c3
-rw-r--r--src/or/cpuworker.c3
-rw-r--r--src/or/dns.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 8950137c2..2b497b352 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1398,6 +1398,9 @@ connection_ap_make_bridge(char *address, uint16_t port)
return -1;
}
+ tor_assert(fd[0] >= 0);
+ tor_assert(fd[1] >= 0);
+
set_socket_nonblocking(fd[0]);
set_socket_nonblocking(fd[1]);
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index badca3563..29fd992f6 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -329,6 +329,9 @@ spawn_cpuworker(void)
return -1;
}
+ tor_assert(fdarray[0] >= 0);
+ tor_assert(fdarray[1] >= 0);
+
fd = fdarray[0];
spawn_func(cpuworker_main, (void*)fdarray);
log_debug(LD_OR,"just spawned a cpu worker.");
diff --git a/src/or/dns.c b/src/or/dns.c
index 79b4acced..2d3d800c2 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -941,6 +941,9 @@ spawn_dnsworker(void)
return -1;
}
+ tor_assert(fdarray[0] >= 0);
+ tor_assert(fdarray[1] >= 0);
+
/* log_fn(LOG_NOTICE,"Before spawn: fdarray @%d has %d:%d",
(int)fdarray, fdarray[0],fdarray[1]); */