gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r17817 - gnunet/src/transport
Date: Thu, 27 Oct 2011 20:52:44 +0200

Author: wachs
Date: 2011-10-27 20:52:43 +0200 (Thu, 27 Oct 2011)
New Revision: 17817

Modified:
   gnunet/src/transport/gnunet-service-transport_neighbours_fsm.c
Log:


Modified: gnunet/src/transport/gnunet-service-transport_neighbours_fsm.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours_fsm.c      
2011-10-27 17:34:14 UTC (rev 17816)
+++ gnunet/src/transport/gnunet-service-transport_neighbours_fsm.c      
2011-10-27 18:52:43 UTC (rev 17817)
@@ -427,7 +427,7 @@
     break;
   case S_CONNECT_SENT:
     if ((state == S_NOT_CONNECTED) || (state == S_CONNECTED) ||
-        (state == S_DISCONNECT))
+        (state == S_DISCONNECT) || /* FIXME SENT -> RECV ISSUE!*/ (state == 
S_CONNECT_RECV))
     {
       allowed = GNUNET_YES;
       break;
@@ -1178,7 +1178,7 @@
     return GNUNET_NO;
   }
 
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Invalid connection state to switch 
addresses ");
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Invalid connection state to switch 
addresses %u ", n->state);
   GNUNET_break_op (0);
   return GNUNET_NO;
 }
@@ -1753,10 +1753,11 @@
   size_t ret;
 
 #if DEBUG_TRANSPORT
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
       "Received CONNECT_ACK message from peer `%s'\n", GNUNET_i2s (peer));
-#endif
 
+
   if (ntohs (message->size) != sizeof (struct SessionConnectMessage))
   {
     GNUNET_break_op (0);
@@ -1769,14 +1770,14 @@
   n = lookup_neighbour (peer);
   if (NULL == n)
     n = setup_neighbour (peer);
-
+/*
   if (n->state != S_CONNECT_SENT)
   {
     GNUNET_break (0);
     send_disconnect(n);
     return;
   }
-
+*/
   if (NULL != session)
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
                      "transport-ats",
@@ -1866,8 +1867,9 @@
     send_disconnect(n);
     GNUNET_break (0);
   }
-
-  if (n->state != S_CONNECT_RECV)
+// FIXME check this
+//  if (n->state != S_CONNECT_RECV)
+  if (is_connecting(n))
   {
     send_disconnect (n);
     change_state (n, S_DISCONNECT);
@@ -1976,9 +1978,11 @@
   }
 
   GNUNET_free (bcc);
-
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+      "Blacklist check due to CONNECT message: `%s'\n");
+/*
   if (n->state != S_NOT_CONNECTED)
-    return;
+    return;*/
   change_state (n, S_CONNECT_RECV);
 
   /* Ask ATS for an address to connect via that address */
@@ -2013,10 +2017,11 @@
   struct BlackListCheckContext * bcc = NULL;
 
 #if DEBUG_TRANSPORT
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
       "Received CONNECT message from peer `%s'\n", GNUNET_i2s (peer));
-#endif
 
+
   if (ntohs (message->size) != sizeof (struct SessionConnectMessage))
   {
     GNUNET_break_op (0);




reply via email to

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