aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-01-10 01:26:04 +0000
committerBart Polot <bart@net.in.tum.de>2015-01-10 01:26:04 +0000
commit7feab9032a5aefa926a283ace44ea2aa6e624fea (patch)
treeb35c5ab8235feea2194d33628f46cd3f3ffc97b6
parentaced092a027108eadbcb3bac45a8caeaf454c9d7 (diff)
downloadgnunet-7feab9032a5aefa926a283ace44ea2aa6e624fea.tar.gz
gnunet-7feab9032a5aefa926a283ace44ea2aa6e624fea.zip
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.
-rw-r--r--src/core/gnunet-service-core_sessions.c2
1 files changed, 1 insertions, 1 deletions
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,
872 GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_MAX_CORK_DELAY); 872 GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_MAX_CORK_DELAY);
873 pos = session->sme_head; 873 pos = session->sme_head;
874 while ( (NULL != pos) && 874 while ( (NULL != pos) &&
875 (pos->priority > sme->priority) ) 875 (pos->priority >= sme->priority) )
876 pos = pos->next; 876 pos = pos->next;
877 if (NULL == pos) 877 if (NULL == pos)
878 GNUNET_CONTAINER_DLL_insert_tail (session->sme_head, 878 GNUNET_CONTAINER_DLL_insert_tail (session->sme_head,