gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r18039 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r18039 - gnunet/src/transport
Date: Mon, 7 Nov 2011 11:46:52 +0100

Author: wachs
Date: 2011-11-07 11:46:52 +0100 (Mon, 07 Nov 2011)
New Revision: 18039

Modified:
   gnunet/src/transport/gnunet-service-transport_neighbours.c
Log:
workaround for:
https://gnunet.org/bugs/view.php?id=1882
https://gnunet.org/bugs/view.php?id=1884


Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-11-07 
10:24:41 UTC (rev 18038)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-11-07 
10:46:52 UTC (rev 18039)
@@ -426,12 +426,16 @@
   n->state_reset = GNUNET_SCHEDULER_NO_TASK;
 
 #if DEBUG_TRANSPORT
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Connection to peer `%s' %s failed in state `%s', resetting 
connection attempt \n",
+#endif
+  /* This jut a temporary debug message to check if a the value
+   * SETUP_CONNECTION_TIMEOUT was choosen to small for slow machines
+   */
+  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+              "Information for developers: Connection to peer `%s' %s failed 
in state `%s', resetting connection attempt \n",
               GNUNET_i2s (&n->id), GST_plugins_a2s (n->plugin_name, n->addr,
                                                     n->addrlen),
               print_state (n->state));
-#endif
+
   GNUNET_STATISTICS_update (GST_stats,
                             gettext_noop
                             ("# failed connection attempts due to timeout"), 1,
@@ -478,7 +482,6 @@
             GNUNET_SCHEDULER_add_delayed (SETUP_CONNECTION_TIMEOUT, 
&reset_task,
                                           n);
       }
-
       break;
     }
     break;
@@ -1331,6 +1334,7 @@
                           plugin_name, address, address_len, GNUNET_YES,
                           &send_connect_continuation, n);
 
+
     return GNUNET_NO;
   }
   /* We received a CONNECT message and asked ATS for an address */
@@ -2013,14 +2017,15 @@
   n = lookup_neighbour (peer);
   if (NULL == n)
     n = setup_neighbour (peer);
-/*
-  if (n->state != S_CONNECT_SENT)
+
+  if (!is_connecting(n))
   {
-    GNUNET_break (0);
-    send_disconnect(&n->id, n->plugin_name, n->addr, n->addrlen, n->session);
+    GNUNET_STATISTICS_update (GST_stats,
+        gettext_noop ("# unexpected CONNECT_ACK messages"), 1,
+        GNUNET_NO);
     return;
   }
-*/
+
   if (NULL != session)
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
                      "transport-ats",
@@ -2133,6 +2138,13 @@
   if (is_connected (n))
     return;
 
+  if (!is_connecting(n))
+  {
+    GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# unexpected ACK 
messages"), 1,
+                              GNUNET_NO);
+    return;
+  }
+
   if (NULL != session)
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
                      "transport-ats",




reply via email to

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