gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18724 - gnunet/src/nse


From: gnunet
Subject: [GNUnet-SVN] r18724 - gnunet/src/nse
Date: Tue, 20 Dec 2011 17:07:09 +0100

Author: bartpolot
Date: 2011-12-20 17:07:09 +0100 (Tue, 20 Dec 2011)
New Revision: 18724

Modified:
   gnunet/src/nse/gnunet-service-nse.c
Log:
- Removed duplicate statistics, minor stylistic changes

Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2011-12-20 16:01:49 UTC (rev 18723)
+++ gnunet/src/nse/gnunet-service-nse.c 2011-12-20 16:07:09 UTC (rev 18724)
@@ -593,7 +593,6 @@
                             GNUNET_NO);
   memcpy (buf, &size_estimate_messages[idx],
           sizeof (struct GNUNET_NSE_FloodMessage));
-  GNUNET_STATISTICS_update (stats, "# flood messages sent", 1, GNUNET_NO);
   return sizeof (struct GNUNET_NSE_FloodMessage);
 }
 
@@ -942,7 +941,7 @@
   {
     /* still stuck in previous round, no point to update, check that
      * we are active here though... */
-    GNUNET_break ((peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK));
+    GNUNET_break (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK);
     return GNUNET_OK;
   }
   if (peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK)
@@ -1080,7 +1079,7 @@
     if (idx != estimate_index)
     {
       /* do not transmit information for the previous round to this peer 
-        anymore (but allow current round) */
+         anymore (but allow current round) */
       peer_entry->previous_round = GNUNET_YES;
       return GNUNET_OK;
     }
@@ -1296,8 +1295,8 @@
   current_timestamp.abs_value =
       (now.abs_value / gnunet_nse_interval.rel_value) *
       gnunet_nse_interval.rel_value;
-  next_timestamp.abs_value =
-      current_timestamp.abs_value + gnunet_nse_interval.rel_value;
+  next_timestamp =
+      GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval);
   estimate_index = HISTORY_SIZE - 1;
   estimate_count = 0;
   if (GNUNET_YES == check_proof_of_work (&my_public_key, my_proof))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]