gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r33993 - gnunet/src/cadet
Date: Mon, 21 Jul 2014 02:15:19 +0200

Author: bartpolot
Date: 2014-07-21 02:15:19 +0200 (Mon, 21 Jul 2014)
New Revision: 33993

Modified:
   gnunet/src/cadet/gnunet-service-cadet_connection.c
Log:
- as connecton_pop destroys many message type wihtout return, count is not 
applicable

Modified: gnunet/src/cadet/gnunet-service-cadet_connection.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.c  2014-07-21 00:15:18 UTC 
(rev 33992)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.c  2014-07-21 00:15:19 UTC 
(rev 33993)
@@ -1818,7 +1818,6 @@
     struct GNUNET_MessageHeader *out_msg;
     struct CadetPeer *neighbor;
     struct CadetPeer *endpoint;
-    int pending_msgs;
 
     if (NULL == t)
     {
@@ -1833,25 +1832,15 @@
     c->state = CADET_CONNECTION_DESTROYED;
     GCT_remove_connection (t, c);
     c->t = NULL;
-    pending_msgs = c->pending_messages;
 
     /* GCP_connection_pop will destroy the connection when the last message
      * is popped! Do not use 'c' after the call. */
     while (NULL != (out_msg = GCP_connection_pop (neighbor, c)))
     {
       GCT_resend_message (out_msg, t);
-      pending_msgs--;
     }
-
-    /* All pending messages should have been popped and the connection
-     * destroyed. If not, destroy the connection anyway! */
-    if (0 < pending_msgs)
-    {
-      GNUNET_break (0);
-      GCC_destroy (c);
-    }
-    else
-      GNUNET_break (0 == pending_msgs); /* Counter error! */
+    /* All pending messages should have been popped,
+     * and the connection destroyed by the continuation. */
   }
   else
   {




reply via email to

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