From: Bart Polot Date: Mon, 14 May 2012 11:26:59 +0000 (+0000) Subject: - Minor style changes, doc X-Git-Tag: initial-import-from-subversion-38251~13501 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=02347b97da85b6d7a6227a73cf43024a1ce74936;p=oweals%2Fgnunet.git - Minor style changes, doc --- diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index 8373b621c..6fc45273e 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c @@ -967,7 +967,7 @@ update_flood_times (void *cls, const GNUNET_HashCode * key, void *value) /* still stuck in previous round, no point to update, check that * we are active here though... */ if (GNUNET_SCHEDULER_NO_TASK == peer_entry->transmit_task && - NULL == peer_entry->th) + NULL == peer_entry->th) { GNUNET_break (0); } @@ -1132,14 +1132,12 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer, } GNUNET_assert (matching_bits > ntohl (size_estimate_messages[idx].matching_bits)); - /* cancel transmission from us to this peer for this round */ + /* Cancel transmission in the other direction, as this peer clearly has + * up-to-date information already. + */ + peer_entry->previous_round = GNUNET_YES; if (idx == estimate_index) { - /* Cancel transmission in the other direction, as this peer clearly has - up-to-date information already. Even if we didn't talk to this peer in - the previous round, we should no longer send it stale information as it - told us about the current round! */ - peer_entry->previous_round = GNUNET_YES; /* cancel any activity for current round */ if (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK) { @@ -1152,11 +1150,6 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer, peer_entry->th = NULL; } } - else - { - /* cancel previous round only */ - peer_entry->previous_round = GNUNET_YES; - } size_estimate_messages[idx] = *incoming_flood; size_estimate_messages[idx].hop_count = htonl (ntohl (incoming_flood->hop_count) + 1);