From 7feab9032a5aefa926a283ace44ea2aa6e624fea Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Sat, 10 Jan 2015 01:26:04 +0000 Subject: Fixed inverting of same-priority bundled messages This change causes the while loop to skip all messages of the same priority, effectively inserting the new message as the last of the same priority. As the messages are extraced from the head, inserting the message in the first available place caused order inversion. --- src/core/gnunet-service-core_sessions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index a168eeed3..021fb68e0 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c @@ -872,7 +872,7 @@ GSC_SESSIONS_transmit (struct GSC_ClientActiveRequest *car, GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_MAX_CORK_DELAY); pos = session->sme_head; while ( (NULL != pos) && - (pos->priority > sme->priority) ) + (pos->priority >= sme->priority) ) pos = pos->next; if (NULL == pos) GNUNET_CONTAINER_DLL_insert_tail (session->sme_head, -- cgit v1.2.3