[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21353 - gnunet/src/fragmentation
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21353 - gnunet/src/fragmentation |
Date: |
Tue, 8 May 2012 20:06:26 +0200 |
Author: grothoff
Date: 2012-05-08 20:06:26 +0200 (Tue, 08 May 2012)
New Revision: 21353
Modified:
gnunet/src/fragmentation/fragmentation.c
Log:
-fix: min delay 50ms, do not skip mindelay if fragmentation block only consists
of 1 msg
Modified: gnunet/src/fragmentation/fragmentation.c
===================================================================
--- gnunet/src/fragmentation/fragmentation.c 2012-05-08 17:10:10 UTC (rev
21352)
+++ gnunet/src/fragmentation/fragmentation.c 2012-05-08 18:06:26 UTC (rev
21353)
@@ -28,6 +28,9 @@
#include "fragmentation.h"
+#define MIN_ACK_DELAY GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MILLISECONDS, 50)
+
+
/**
* Fragmentation context.
*/
@@ -172,6 +175,11 @@
}
fc->next_transmission = (fc->next_transmission + 1) % 64;
wrap |= (fc->next_transmission == 0);
+ while (0 == (fc->acks & (1LL << fc->next_transmission)))
+ {
+ fc->next_transmission = (fc->next_transmission + 1) % 64;
+ wrap |= (fc->next_transmission == 0);
+ }
/* assemble fragmentation message */
mbuf = (const char *) &fc[1];
@@ -211,7 +219,7 @@
GNUNET_TIME_relative_multiply (fc->delay,
fc->num_rounds));
/* never use zero, need some time for ACK always */
- delay = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, delay);
+ delay = GNUNET_TIME_relative_max (MIN_ACK_DELAY, delay);
fc->last_round = GNUNET_TIME_absolute_get ();
fc->wack = GNUNET_YES;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21353 - gnunet/src/fragmentation,
gnunet <=