gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20385 - gnunet/src/nse


From: gnunet
Subject: [GNUnet-SVN] r20385 - gnunet/src/nse
Date: Thu, 8 Mar 2012 20:24:42 +0100

Author: bartpolot
Date: 2012-03-08 20:24:42 +0100 (Thu, 08 Mar 2012)
New Revision: 20385

Modified:
   gnunet/src/nse/gnunet-service-nse.c
Log:
- Fix comparison direction


Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2012-03-08 19:21:47 UTC (rev 20384)
+++ gnunet/src/nse/gnunet-service-nse.c 2012-03-08 19:24:42 UTC (rev 20385)
@@ -762,15 +762,15 @@
         GNUNET_SCHEDULER_add_delayed (offset, &update_flood_message, NULL);
     return;
   }
+  estimate_index = (estimate_index + 1) % HISTORY_SIZE;
+  if (estimate_count < HISTORY_SIZE)
+    estimate_count++;
   current_timestamp = next_timestamp;
   next_timestamp =
       GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval);
-  estimate_index = (estimate_index + 1) % HISTORY_SIZE;
-  if (estimate_count < HISTORY_SIZE)
-    estimate_count++;
   if ((current_timestamp.abs_value ==
       GNUNET_TIME_absolute_ntoh (next_message.timestamp).abs_value) &&
-      (get_matching_bits (current_timestamp, &my_identity) >
+      (get_matching_bits (current_timestamp, &my_identity) <
       ntohl(next_message.matching_bits)))
   {
     /* we received a message for this round way early, use it! */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]