[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] use the real socketpair if we"ve got it
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
Modified Files:
util.c
Log Message:
use the real socketpair if we've got it
now it's just windows that has to use the kludged one
Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- util.c 17 Apr 2004 06:35:03 -0000 1.86
+++ util.c 19 Apr 2004 21:31:32 -0000 1.87
@@ -837,10 +837,14 @@
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;