[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30982 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30982 - gnunet/src/mesh |
Date: |
Fri, 29 Nov 2013 19:12:52 +0100 |
Author: bartpolot
Date: 2013-11-29 19:12:52 +0100 (Fri, 29 Nov 2013)
New Revision: 30982
Modified:
gnunet/src/mesh/gnunet-service-mesh_channel.c
Log:
- fix super-fast (< 20ms) retransmission behavior when the RTT is smaller than
the core delay
Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-11-29 17:45:20 UTC
(rev 30981)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-11-29 18:12:52 UTC
(rev 30982)
@@ -880,8 +880,9 @@
switch (ch_q->type)
{
case GNUNET_MESSAGE_TYPE_MESH_DATA:
- LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! SENT %u %s\n",
- NULL != copy ? copy->mid : 0, GM_m2s (type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! SENT %u %s (c: %p, q: %p)\n",
+ copy->mid, GM_m2s (type), copy, copy->q);
+ GNUNET_assert (ch_q == copy->q);
copy->timestamp = GNUNET_TIME_absolute_get ();
rel = copy->rel;
if (GNUNET_SCHEDULER_NO_TASK == rel->retry_task)
@@ -2035,11 +2036,24 @@
else
{
q->copy = (struct MeshReliableMessage *) existing_copy;
+ if (NULL != q->copy->q)
+ {
+ /* Last retransmission was scheduled but not sent!
+ * This retransmission was executed by a ch_message_sent
+ * following a very fast RRT, which scheduled the retransmission
+ * before the retransmitted message had a chance to leave the peer.
+ * Cancel this transmission and wait until the pending
+ * retransmission schedules the next one.
+ */
+ GNUNET_free (q);
+ return;
+ }
LOG (GNUNET_ERROR_TYPE_DEBUG,
" using existing copy: %p {r:%p q:%p t:%u}\n",
existing_copy,
q->copy->rel, q->copy->q, q->copy->type);
}
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " new q: %p\n", q);
q->copy->q = q;
q->q = GMT_send_prebuilt_message (message, ch->t, ch,
fwd, NULL != existing_copy,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30982 - gnunet/src/mesh,
gnunet <=