gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r36450 - gnunet/src/cadet


From: gnunet
Subject: [GNUnet-SVN] r36450 - gnunet/src/cadet
Date: Tue, 6 Oct 2015 16:14:16 +0200

Author: bartpolot
Date: 2015-10-06 16:14:15 +0200 (Tue, 06 Oct 2015)
New Revision: 36450

Modified:
   gnunet/src/cadet/gnunet-service-cadet_connection.c
Log:
- ignore confirmation of connections that are being destroyed (tunnel shutting 
down, for instance)

Modified: gnunet/src/cadet/gnunet-service-cadet_connection.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.c  2015-10-06 12:07:00 UTC 
(rev 36449)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.c  2015-10-06 14:14:15 UTC 
(rev 36450)
@@ -460,6 +460,12 @@
 }
 
 
+/**
+ * Change the connection state. Cannot change a connection marked as destroyed.
+ *
+ * @param c Connection to change.
+ * @param state New state to set.
+ */
 static void
 connection_change_state (struct CadetConnection* c,
                          enum CadetConnectionState state)
@@ -2135,6 +2141,16 @@
     return GNUNET_OK;
   }
 
+  if (GNUNET_NO != c->destroy)
+  {
+    GNUNET_assert (CADET_CONNECTION_DESTROYED != c->state);
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "connection %s being destroyed, ignoring confirm\n",
+         GCC_2s (c));
+    GCC_check_connections ();
+    return GNUNET_OK;
+  }
+
   oldstate = c->state;
   LOG (GNUNET_ERROR_TYPE_DEBUG, "  via peer %s\n", GNUNET_i2s (peer));
   pi = GCP_get (peer, GNUNET_YES);




reply via email to

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