summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2023-04-27 18:17:48 +0200
committert3sserakt <t3ss@posteo.de>2023-05-02 12:41:02 +0200
commit29857df6f9f702c8773c2c815adb571bb507544c (patch)
tree19c6b598bc385e184122bb0e4ad8649dcda7a1f5
parent498b0c3957b499213246972d95b5c98d8553b2d9 (diff)
TNG: Fixed logic bug in search for QueueEntry after receiving SendMessageToAck.
-rw-r--r--src/transport/gnunet-service-tng.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 5aa9f1a51..f2852c71a 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -10272,13 +10272,15 @@ handle_send_message_ack (void *cls,
for (struct QueueEntry *qep = queue->queue_head; NULL != qep;
qep = qep->next)
{
- if (qep->mid != GNUNET_ntohll (sma->mid) && queue->qid != ntohl (sma->qid))
+ if (qep->mid != GNUNET_ntohll (sma->mid) || queue->qid != ntohl (
+ sma->qid))
continue;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "QueueEntry MID: %llu on queue QID: %llu, Ack MID: %llu\n",
+ "QueueEntry MID: %llu on queue QID: %lu, Ack MID: %llu Ack QID %LLU\n",
(unsigned long long) qep->mid,
(unsigned long) queue->qid,
- GNUNET_ntohll (sma->mid));
+ GNUNET_ntohll (sma->mid),
+ ntohl (sma->qid));
qe = qep;
if ((NULL != qe->pm) && (qe->pm->qe != qe))
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,