gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r6239 - GNUnet/src/transports
Date: Sun, 10 Feb 2008 21:35:46 -0700 (MST)

Author: grothoff
Date: 2008-02-10 21:35:46 -0700 (Sun, 10 Feb 2008)
New Revision: 6239

Modified:
   GNUnet/src/transports/tcp.c
Log:
fixing recently introduced issue with NAT and older issue with failure to 
cancel FAST-tcp timeout

Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2008-02-10 22:37:54 UTC (rev 6238)
+++ GNUnet/src/transports/tcp.c 2008-02-11 04:35:46 UTC (rev 6239)
@@ -557,6 +557,10 @@
               if (session->in_select)
                 {
                   session->users++;
+                 if (session->in_select == GNUNET_YES)
+                   GNUNET_select_change_timeout (selector,
+                                                 session->sock, 
+                                                 TCP_TIMEOUT);
                   GNUNET_mutex_unlock (lock);
                   *tsessionPtr = session->tsession;
                   return GNUNET_OK;
@@ -713,6 +717,7 @@
     {
       s = -1;                   /* no listening! */
       addrlen = 0;
+      available_protocols = VERSION_AVAILABLE_IPV6 | VERSION_AVAILABLE_IPV4;
     }
   selector = GNUNET_select_create ("tcp",
                                    GNUNET_NO,
@@ -743,7 +748,8 @@
       GNUNET_select_destroy (selector);
       selector = NULL;
     }
-  available_protocols = VERSION_AVAILABLE_NONE;
+  if (get_port() == 0)
+    available_protocols = VERSION_AVAILABLE_NONE;
   return GNUNET_OK;
 }
 





reply via email to

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