[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16261 - gnunet/src/nse
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16261 - gnunet/src/nse |
Date: |
Fri, 29 Jul 2011 10:26:14 +0200 |
Author: grothoff
Date: 2011-07-29 10:26:14 +0200 (Fri, 29 Jul 2011)
New Revision: 16261
Modified:
gnunet/src/nse/gnunet-service-nse.c
Log:
option for not having delays
Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2011-07-28 19:14:09 UTC (rev 16260)
+++ gnunet/src/nse/gnunet-service-nse.c 2011-07-29 08:26:14 UTC (rev 16261)
@@ -45,6 +45,8 @@
#include "gnunet_nse_service.h"
#include "nse.h"
+#define NODELAYS GNUNET_YES
+
/**
* Send messages on connect.
*/
@@ -396,6 +398,9 @@
static struct GNUNET_TIME_Relative
get_delay_randomization (uint32_t matching_bits)
{
+#if NODELAYS
+ return GNUNET_TIME_UNIT_ZERO;
+#else
struct GNUNET_TIME_Relative ret;
if (matching_bits == 0)
@@ -403,6 +408,7 @@
ret.rel_value = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
(uint32_t) (get_matching_bits_delay
(matching_bits - 1) / (double) (hop_count_max + 1)));
return ret;
+#endif
}
@@ -447,8 +453,12 @@
{
case -1:
/* previous round is randomized between 0 and 50 ms */
+#if NODELAYS
+ ret = GNUNET_TIME_UNIT_ZERO;
+#else
ret.rel_value = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
50);
+#endif
#if DEBUG_NSE
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"Transmitting previous round behind schedule in %llu ms\n",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16261 - gnunet/src/nse,
gnunet <=