fixing 1802
authorChristian Grothoff <christian@grothoff.org>
Wed, 28 Sep 2011 23:06:28 +0000 (23:06 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 28 Sep 2011 23:06:28 +0000 (23:06 +0000)
src/transport/gnunet-service-transport_neighbours.c

index 6cbc5aabe44f832293ff27da5d02498727b5b0b8..09e24565babb9c7bf7f36900353cc84980bed2c9 100644 (file)
@@ -361,12 +361,12 @@ try_transmission_to_peer (struct NeighbourMapEntry *n)
     return;                     /* transmission already pending */
   if (n->transmission_task != GNUNET_SCHEDULER_NO_TASK)
     return;                     /* currently waiting for bandwidth */
-  mq = n->messages_head;
   while (NULL != (mq = n->messages_head))
   {
     timeout = GNUNET_TIME_absolute_get_remaining (mq->timeout);
     if (timeout.rel_value > 0)
       break;
+    GNUNET_CONTAINER_DLL_remove (n->messages_head, n->messages_tail, mq);
     transmit_send_continuation (mq, &n->id, GNUNET_SYSERR);     /* timeout */
   }
   if (NULL == mq)