summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-19 21:31:32 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-19 21:31:32 +0000
commit06a60c4fbba5f1853d6d8a4b9e2dd1b705225f72 (patch)
tree2bee762cfe36c45d3f1e3a2ac4faeb16d8cbf2db
parenta3200f79cd85fad81f9f5e0c05bc2d8b4b992f25 (diff)
downloadtor-06a60c4fbba5f1853d6d8a4b9e2dd1b705225f72.tar.gz
tor-06a60c4fbba5f1853d6d8a4b9e2dd1b705225f72.zip
use the real socketpair if we've got it
now it's just windows that has to use the kludged one svn:r1675
-rw-r--r--src/common/util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 81c7c5ad69..85d80d3607 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -837,10 +837,14 @@ void spawn_exit()
int
tor_socketpair(int family, int type, int protocol, int fd[2])
{
-#ifdef HAVE_SOCKETPAIR_XXXX
- /* For testing purposes, we never fall back to real socketpairs. */
+#ifdef HAVE_SOCKETPAIR
return socketpair(family, type, protocol, fd);
#else
+ /* This socketpair does not work when localhost is down. So
+ * it's really not the same thing at all. But it's close enough
+ * for now, and really, when localhost is down sometimes, we
+ * have other problems too.
+ */
int listener = -1;
int connector = -1;
int acceptor = -1;