Fixed queue bug
authorBart Polot <bart@net.in.tum.de>
Tue, 17 Jan 2012 15:36:43 +0000 (15:36 +0000)
committerBart Polot <bart@net.in.tum.de>
Tue, 17 Jan 2012 15:36:43 +0000 (15:36 +0000)
src/mesh/mesh_api.c

index c089b3b3fbf269bc4999ffed1b7d6f9f9904e3d0..cebbd7518a48b771851b312b2978f5b831d5e9bd 100644 (file)
@@ -1123,6 +1123,11 @@ send_callback (void *cls, size_t size, void *buf)
     }
     if (th->timeout_task != GNUNET_SCHEDULER_NO_TASK)
       GNUNET_SCHEDULER_cancel (th->timeout_task);
+    if (NULL != th->tunnel)
+    {
+      th->tunnel->mesh->npackets--;
+      th->tunnel->npackets--;
+    }
     GNUNET_CONTAINER_DLL_remove (h->th_head, h->th_tail, th);
     GNUNET_free (th);
     cbuf += psize;