aboutsummaryrefslogtreecommitdiff
path: root/src/nse
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-12-20 16:07:09 +0000
committerBart Polot <bart@net.in.tum.de>2011-12-20 16:07:09 +0000
commit2419f534220ce866453050fab08825c90be90d73 (patch)
treef031911f02880dbfcbbb393307319c49d97363a5 /src/nse
parentcafb5577120a0cc3cc093c5557159c9b5001dc01 (diff)
downloadgnunet-2419f534220ce866453050fab08825c90be90d73.tar.gz
gnunet-2419f534220ce866453050fab08825c90be90d73.zip
- Removed duplicate statistics, minor stylistic changes
Diffstat (limited to 'src/nse')
-rw-r--r--src/nse/gnunet-service-nse.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index a7c31c49c..7c3f14273 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -593,7 +593,6 @@ transmit_ready (void *cls, size_t size, void *buf)
593 GNUNET_NO); 593 GNUNET_NO);
594 memcpy (buf, &size_estimate_messages[idx], 594 memcpy (buf, &size_estimate_messages[idx],
595 sizeof (struct GNUNET_NSE_FloodMessage)); 595 sizeof (struct GNUNET_NSE_FloodMessage));
596 GNUNET_STATISTICS_update (stats, "# flood messages sent", 1, GNUNET_NO);
597 return sizeof (struct GNUNET_NSE_FloodMessage); 596 return sizeof (struct GNUNET_NSE_FloodMessage);
598} 597}
599 598
@@ -942,7 +941,7 @@ update_flood_times (void *cls, const GNUNET_HashCode * key, void *value)
942 { 941 {
943 /* still stuck in previous round, no point to update, check that 942 /* still stuck in previous round, no point to update, check that
944 * we are active here though... */ 943 * we are active here though... */
945 GNUNET_break ((peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK)); 944 GNUNET_break (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK);
946 return GNUNET_OK; 945 return GNUNET_OK;
947 } 946 }
948 if (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK) 947 if (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK)
@@ -1080,7 +1079,7 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
1080 if (idx != estimate_index) 1079 if (idx != estimate_index)
1081 { 1080 {
1082 /* do not transmit information for the previous round to this peer 1081 /* do not transmit information for the previous round to this peer
1083 anymore (but allow current round) */ 1082 anymore (but allow current round) */
1084 peer_entry->previous_round = GNUNET_YES; 1083 peer_entry->previous_round = GNUNET_YES;
1085 return GNUNET_OK; 1084 return GNUNET_OK;
1086 } 1085 }
@@ -1296,8 +1295,8 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
1296 current_timestamp.abs_value = 1295 current_timestamp.abs_value =
1297 (now.abs_value / gnunet_nse_interval.rel_value) * 1296 (now.abs_value / gnunet_nse_interval.rel_value) *
1298 gnunet_nse_interval.rel_value; 1297 gnunet_nse_interval.rel_value;
1299 next_timestamp.abs_value = 1298 next_timestamp =
1300 current_timestamp.abs_value + gnunet_nse_interval.rel_value; 1299 GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval);
1301 estimate_index = HISTORY_SIZE - 1; 1300 estimate_index = HISTORY_SIZE - 1;
1302 estimate_count = 0; 1301 estimate_count = 0;
1303 if (GNUNET_YES == check_proof_of_work (&my_public_key, my_proof)) 1302 if (GNUNET_YES == check_proof_of_work (&my_public_key, my_proof))