gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r27638 - gnunet/src/mesh
Date: Thu, 27 Jun 2013 00:49:43 +0200

Author: bartpolot
Date: 2013-06-27 00:49:43 +0200 (Thu, 27 Jun 2013)
New Revision: 27638

Modified:
   gnunet/src/mesh/gnunet-service-mesh-new.c
Log:
- just update fc->queue for payload messages

Modified: gnunet/src/mesh/gnunet-service-mesh-new.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh-new.c   2013-06-26 17:25:48 UTC (rev 
27637)
+++ gnunet/src/mesh/gnunet-service-mesh-new.c   2013-06-26 22:49:43 UTC (rev 
27638)
@@ -236,7 +236,7 @@
   uint32_t last_ack_recv;
 
   /**
-   * How many messages are in the queue towards this peer.
+   * How many payload messages are in the queue towards this peer.
    */
   uint32_t queue_n;
 
@@ -2743,16 +2743,20 @@
                                queue);
 
   /* Delete from appropriate fc in the tunnel */
-  if (queue->peer->id == queue->tunnel->prev_hop)
-    fc = &queue->tunnel->prev_fc;
-  else if (queue->peer->id == queue->tunnel->next_hop)
-    fc = &queue->tunnel->next_fc;
-  else
+  if (GNUNET_MESSAGE_TYPE_MESH_UNICAST == queue->type ||
+      GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN == queue->type )
   {
-    GNUNET_break (0);
-    return;
+    if (queue->peer->id == queue->tunnel->prev_hop)
+      fc = &queue->tunnel->prev_fc;
+    else if (queue->peer->id == queue->tunnel->next_hop)
+      fc = &queue->tunnel->next_fc;
+    else
+    {
+      GNUNET_break (0);
+      return;
+    }
+    fc->queue_n--;
   }
-  fc->queue_n--;
   GNUNET_free (queue);
 }
 
@@ -3020,6 +3024,9 @@
     if (*n >= t->queue_max)
     {
       GNUNET_break(0);
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                  "queue full: %u/%u\n",
+                  *n, t->queue_max);
       GNUNET_STATISTICS_update(stats,
                                "# messages dropped (buffer full)",
                                1, GNUNET_NO);




reply via email to

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