aboutsummaryrefslogtreecommitdiff
path: root/src/nse
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-05-14 11:26:59 +0000
committerBart Polot <bart@net.in.tum.de>2012-05-14 11:26:59 +0000
commit02347b97da85b6d7a6227a73cf43024a1ce74936 (patch)
treed60f227a4b2f02e64b4c5bef80a9f236509019f1 /src/nse
parentc4cb61ff40c240d97a6b7db91e9bc70337a6346e (diff)
downloadgnunet-02347b97da85b6d7a6227a73cf43024a1ce74936.tar.gz
gnunet-02347b97da85b6d7a6227a73cf43024a1ce74936.zip
- Minor style changes, doc
Diffstat (limited to 'src/nse')
-rw-r--r--src/nse/gnunet-service-nse.c17
1 files changed, 5 insertions, 12 deletions
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)
967 /* still stuck in previous round, no point to update, check that 967 /* still stuck in previous round, no point to update, check that
968 * we are active here though... */ 968 * we are active here though... */
969 if (GNUNET_SCHEDULER_NO_TASK == peer_entry->transmit_task && 969 if (GNUNET_SCHEDULER_NO_TASK == peer_entry->transmit_task &&
970 NULL == peer_entry->th) 970 NULL == peer_entry->th)
971 { 971 {
972 GNUNET_break (0); 972 GNUNET_break (0);
973 } 973 }
@@ -1132,14 +1132,12 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
1132 } 1132 }
1133 GNUNET_assert (matching_bits > 1133 GNUNET_assert (matching_bits >
1134 ntohl (size_estimate_messages[idx].matching_bits)); 1134 ntohl (size_estimate_messages[idx].matching_bits));
1135 /* cancel transmission from us to this peer for this round */ 1135 /* Cancel transmission in the other direction, as this peer clearly has
1136 * up-to-date information already.
1137 */
1138 peer_entry->previous_round = GNUNET_YES;
1136 if (idx == estimate_index) 1139 if (idx == estimate_index)
1137 { 1140 {
1138 /* Cancel transmission in the other direction, as this peer clearly has
1139 up-to-date information already. Even if we didn't talk to this peer in
1140 the previous round, we should no longer send it stale information as it
1141 told us about the current round! */
1142 peer_entry->previous_round = GNUNET_YES;
1143 /* cancel any activity for current round */ 1141 /* cancel any activity for current round */
1144 if (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK) 1142 if (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK)
1145 { 1143 {
@@ -1152,11 +1150,6 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
1152 peer_entry->th = NULL; 1150 peer_entry->th = NULL;
1153 } 1151 }
1154 } 1152 }
1155 else
1156 {
1157 /* cancel previous round only */
1158 peer_entry->previous_round = GNUNET_YES;
1159 }
1160 size_estimate_messages[idx] = *incoming_flood; 1153 size_estimate_messages[idx] = *incoming_flood;
1161 size_estimate_messages[idx].hop_count = 1154 size_estimate_messages[idx].hop_count =
1162 htonl (ntohl (incoming_flood->hop_count) + 1); 1155 htonl (ntohl (incoming_flood->hop_count) + 1);