diff options
author | t3sserakt <t3ss@posteo.de> | 2023-04-27 18:17:48 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2023-05-02 12:41:02 +0200 |
commit | 29857df6f9f702c8773c2c815adb571bb507544c (patch) | |
tree | 19c6b598bc385e184122bb0e4ad8649dcda7a1f5 | |
parent | 498b0c3957b499213246972d95b5c98d8553b2d9 (diff) | |
download | gnunet-29857df6f9f702c8773c2c815adb571bb507544c.tar.gz gnunet-29857df6f9f702c8773c2c815adb571bb507544c.zip |
TNG: Fixed logic bug in search for QueueEntry after receiving SendMessageToAck.
-rw-r--r-- | src/transport/gnunet-service-tng.c | 8 |
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, | |||
10272 | for (struct QueueEntry *qep = queue->queue_head; NULL != qep; | 10272 | for (struct QueueEntry *qep = queue->queue_head; NULL != qep; |
10273 | qep = qep->next) | 10273 | qep = qep->next) |
10274 | { | 10274 | { |
10275 | if (qep->mid != GNUNET_ntohll (sma->mid) && queue->qid != ntohl (sma->qid)) | 10275 | if (qep->mid != GNUNET_ntohll (sma->mid) || queue->qid != ntohl ( |
10276 | sma->qid)) | ||
10276 | continue; | 10277 | continue; |
10277 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 10278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
10278 | "QueueEntry MID: %llu on queue QID: %llu, Ack MID: %llu\n", | 10279 | "QueueEntry MID: %llu on queue QID: %lu, Ack MID: %llu Ack QID %LLU\n", |
10279 | (unsigned long long) qep->mid, | 10280 | (unsigned long long) qep->mid, |
10280 | (unsigned long) queue->qid, | 10281 | (unsigned long) queue->qid, |
10281 | GNUNET_ntohll (sma->mid)); | 10282 | GNUNET_ntohll (sma->mid), |
10283 | ntohl (sma->qid)); | ||
10282 | qe = qep; | 10284 | qe = qep; |
10283 | if ((NULL != qe->pm) && (qe->pm->qe != qe)) | 10285 | if ((NULL != qe->pm) && (qe->pm->qe != qe)) |
10284 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 10286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |