aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-24 10:23:14 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-24 10:23:14 +0000
commitaf40dca44fdc17cf8e4f3486b411b2da0d9d5462 (patch)
tree63f99b813d3378f7891002816742c5c961bc08eb /src/core
parent076fb3feafea617d600630507ff9c80f9daf4d30 (diff)
downloadgnunet-af40dca44fdc17cf8e4f3486b411b2da0d9d5462.tar.gz
gnunet-af40dca44fdc17cf8e4f3486b411b2da0d9d5462.zip
prevent same message from being requested twice by always skipping head-of-queue when inserting (possibly related to 1957)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_api.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 09a5c54a8..a279874d7 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -1423,15 +1423,12 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
1423 GNUNET_free (minp); 1423 GNUNET_free (minp);
1424 } 1424 }
1425 1425
1426 /* Order entries by deadline, but SKIP 'HEAD' if 1426 /* Order entries by deadline, but SKIP 'HEAD' (as we may have transmitted
1427 * we're in the 'ready_peer_*' DLL */ 1427 that request already or might even already be approved to transmit that
1428 message to core) */
1428 pos = pr->pending_head; 1429 pos = pr->pending_head;
1429 if ((pr->prev != NULL) || (pr->next != NULL) || 1430 if (pos != NULL)
1430 (pr == handle->ready_peer_head))
1431 {
1432 GNUNET_assert (pos != NULL);
1433 pos = pos->next; /* skip head */ 1431 pos = pos->next; /* skip head */
1434 }
1435 1432
1436 /* insertion sort */ 1433 /* insertion sort */
1437 prev = pos; 1434 prev = pos;