gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r6502 - GNUnet/src/transports


From: gnunet
Subject: [GNUnet-SVN] r6502 - GNUnet/src/transports
Date: Sun, 2 Mar 2008 00:21:21 -0700 (MST)

Author: grothoff
Date: 2008-03-02 00:21:20 -0700 (Sun, 02 Mar 2008)
New Revision: 6502

Modified:
   GNUnet/src/transports/tcp.c
Log:
alternate

Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2008-03-02 06:10:07 UTC (rev 6501)
+++ GNUnet/src/transports/tcp.c 2008-03-02 07:21:20 UTC (rev 6502)
@@ -573,7 +573,13 @@
     }
   haddr = (const HostAddress *) &hello[1];
   available = ntohs (haddr->availability) & available_protocols;
-
+  if (available == (VERSION_AVAILABLE_IPV4 | VERSION_AVAILABLE_IPV6))
+    {
+      if (GNUNET_random_u32(GNUNET_RANDOM_QUALITY_WEAK, 2) == 0)
+       available = VERSION_AVAILABLE_IPV4;
+      else
+       available = VERSION_AVAILABLE_IPV6;
+    }
   if ((available & VERSION_AVAILABLE_IPV4) > 0)
     sock = SOCKET (PF_INET, SOCK_STREAM, 0);
   else if ((available & VERSION_AVAILABLE_IPV6) > 0)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]