gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r31208 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r31208 - gnunet/src/mesh
Date: Mon, 9 Dec 2013 13:54:49 +0100

Author: bartpolot
Date: 2013-12-09 13:54:49 +0100 (Mon, 09 Dec 2013)
New Revision: 31208

Modified:
   gnunet/src/mesh/gnunet-service-mesh_channel.c
Log:
-fixed 3174 part 1


Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c       2013-12-09 12:08:12 UTC 
(rev 31207)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c       2013-12-09 12:54:49 UTC 
(rev 31208)
@@ -316,7 +316,7 @@
  *                    is skewed by the retransmission, count only for the
  *                    retransmitted message.
  */
-static void
+static int
 rel_message_free (struct MeshReliableMessage *copy, int update_time);
 
 /**
@@ -993,7 +993,7 @@
 
     /* Now copy->mid == target, free it */
     next = copy->next;
-    rel_message_free (copy, GNUNET_YES);
+    GNUNET_break (GNUNET_YES != rel_message_free (copy, GNUNET_YES));
     copy = next;
   }
   LOG (GNUNET_ERROR_TYPE_DEBUG, "free_sent_reliable END\n");
@@ -1010,8 +1010,11 @@
  *                    If this message is ACK in a batch the timing information
  *                    is skewed by the retransmission, count only for the
  *                    retransmitted message.
+ *
+ * @return #GNUNET_YES if channel was destroyed as a result of the call,
+ *         #GNUNET_NO otherwise.
  */
-static void
+static int
 rel_message_free (struct MeshReliableMessage *copy, int update_time)
 {
   struct MeshChannelReliability *rel;
@@ -1056,7 +1059,9 @@
     struct MeshTunnel3 *t = rel->ch->t;
     GMCH_destroy (rel->ch);
     GMT_destroy_if_empty (t);
+    return GNUNET_YES;
   }
+  return GNUNET_NO;
 }
 
 
@@ -1954,7 +1959,8 @@
     work = GNUNET_YES;
     LOG (GNUNET_ERROR_TYPE_DEBUG, " !!  id %u\n", copy->mid);
     next = copy->next;
-    rel_message_free (copy, GNUNET_YES);
+    if (GNUNET_YES == rel_message_free (copy, GNUNET_YES))
+      return;
   }
 
   /* ACK client if needed */




reply via email to

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