]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
use the real socketpair if we've got it
authorRoger Dingledine <arma@torproject.org>
Mon, 19 Apr 2004 21:31:32 +0000 (21:31 +0000)
committerRoger Dingledine <arma@torproject.org>
Mon, 19 Apr 2004 21:31:32 +0000 (21:31 +0000)
now it's just windows that has to use the kludged one

svn:r1675

src/common/util.c

index 81c7c5ad69a58548ee3933d4841a22fb8ac1b7ea..85d80d36074c2b62ce17c294ef3332eb49340f4f 100644 (file)
@@ -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;