summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2023-04-27 18:13:55 +0200
committert3sserakt <t3ss@posteo.de>2023-05-02 12:41:02 +0200
commit498b0c3957b499213246972d95b5c98d8553b2d9 (patch)
treef60aaaad6f00c6bb21ae7bf75d31f5afa1a71338
parente0d5206115db8eeeb42ca50237805f165f60c954 (diff)
TNG: Fixed misplaced increase of queue length.
-rw-r--r--src/transport/gnunet-service-tng.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index f030944bb..5aa9f1a51 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -4488,15 +4488,19 @@ queue_send_msg (struct Queue *queue,
}
GNUNET_CONTAINER_DLL_insert (queue->queue_head, queue->queue_tail, qe);
GNUNET_assert (CT_COMMUNICATOR == queue->tc->type);
- queue->queue_length++;
- queue->tc->details.communicator.total_queue_length++;
- //FIXME Probably this if statement here is completely wrong in this method,
- // and only fixed a symptom, but not an actual bug.
if (0 == queue->q_capacity)
{
+ // Messages without FC or fragments can get here.
+ if (NULL != pm)
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Message %llu (pm type %u) was not send because queue has no capacity.\n",
+ pm->logging_uuid,
+ pm->pmt);
GNUNET_free (env);
return;
}
+ queue->queue_length++;
+ queue->tc->details.communicator.total_queue_length++;
if (GNUNET_NO == queue->unlimited_length)
queue->q_capacity--;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,