diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-03-08 19:24:42 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-03-08 19:24:42 +0000 |
commit | f43a1a11fa807caf1f3dc909c929c50a784ae3b7 (patch) | |
tree | 30ea7078ee07ac08f7fda64f44b72b76280e3e35 /src/nse | |
parent | 85e8ba9a21635c055c11ea0bd5bc447149fc84b8 (diff) | |
download | gnunet-f43a1a11fa807caf1f3dc909c929c50a784ae3b7.tar.gz gnunet-f43a1a11fa807caf1f3dc909c929c50a784ae3b7.zip |
- Fix comparison direction
Diffstat (limited to 'src/nse')
-rw-r--r-- | src/nse/gnunet-service-nse.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) | |||
762 | GNUNET_SCHEDULER_add_delayed (offset, &update_flood_message, NULL); | 762 | GNUNET_SCHEDULER_add_delayed (offset, &update_flood_message, NULL); |
763 | return; | 763 | return; |
764 | } | 764 | } |
765 | current_timestamp = next_timestamp; | ||
766 | next_timestamp = | ||
767 | GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval); | ||
768 | estimate_index = (estimate_index + 1) % HISTORY_SIZE; | 765 | estimate_index = (estimate_index + 1) % HISTORY_SIZE; |
769 | if (estimate_count < HISTORY_SIZE) | 766 | if (estimate_count < HISTORY_SIZE) |
770 | estimate_count++; | 767 | estimate_count++; |
768 | current_timestamp = next_timestamp; | ||
769 | next_timestamp = | ||
770 | GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval); | ||
771 | if ((current_timestamp.abs_value == | 771 | if ((current_timestamp.abs_value == |
772 | GNUNET_TIME_absolute_ntoh (next_message.timestamp).abs_value) && | 772 | GNUNET_TIME_absolute_ntoh (next_message.timestamp).abs_value) && |
773 | (get_matching_bits (current_timestamp, &my_identity) > | 773 | (get_matching_bits (current_timestamp, &my_identity) < |
774 | ntohl(next_message.matching_bits))) | 774 | ntohl(next_message.matching_bits))) |
775 | { | 775 | { |
776 | /* we received a message for this round way early, use it! */ | 776 | /* we received a message for this round way early, use it! */ |