From: Bart Polot Date: Thu, 8 Mar 2012 19:24:42 +0000 (+0000) Subject: - Fix comparison direction X-Git-Tag: initial-import-from-subversion-38251~14338 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f43a1a11fa807caf1f3dc909c929c50a784ae3b7;p=oweals%2Fgnunet.git - Fix comparison direction --- diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index bf78e2371..12763583c 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c @@ -762,15 +762,15 @@ update_flood_message (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_SCHEDULER_add_delayed (offset, &update_flood_message, NULL); return; } - 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++; + current_timestamp = next_timestamp; + next_timestamp = + GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval); 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! */