-track hello offer handle while it is active
[oweals/gnunet.git] / src / cadet / gnunet-cadet-profiler.c
index 2cfbfdaa4c8d247aa289abc3377fd9b55b243f38..7128d9d7c3a99464407adeac2977da1f39aa102c 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file cadet/gnunet-cadet-profiler.c
@@ -36,7 +36,7 @@
 /**
  * Paximum ping period in milliseconds. Real period = rand (0, PING_PERIOD)
  */
-#define PING_PERIOD 1000
+#define PING_PERIOD 500
 
 /**
  * How long until we give up on connecting the peers?
@@ -56,7 +56,7 @@
 /**
  * Ratio of peers active. First round always is 1.0.
  */
-static float rounds[] = {0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.0};
+static float rounds[] = {0.8, 0.6, 0.8, 0.5, 0.3, 0.8, 0.0};
 
 /**
  * Message type for pings.
@@ -617,7 +617,7 @@ ping (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   peer->ping_task = NULL;
 
-  if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0
+  if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)
       || GNUNET_YES == test_finished)
     return;
 
@@ -625,9 +625,9 @@ ping (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
               get_index (peer), get_index (peer->dest), peer->data_sent);
 
   GNUNET_CADET_notify_transmit_ready (peer->ch, GNUNET_NO,
-                                     GNUNET_TIME_UNIT_FOREVER_REL,
-                                     sizeof (struct CadetPingMessage),
-                                     &tmt_rdy_ping, peer);
+                                      GNUNET_TIME_UNIT_FOREVER_REL,
+                                      sizeof (struct CadetPingMessage),
+                                      &tmt_rdy_ping, peer);
 }
 
 /**
@@ -884,8 +884,8 @@ start_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   {
     peers[i].dest = select_random_peer (&peers[i]);
     peers[i].ch = GNUNET_CADET_channel_create (peers[i].cadet, NULL,
-                                              &peers[i].dest->id,
-                                              1, flags);
+                                               &peers[i].dest->id,
+                                               1, flags);
     if (NULL == peers[i].ch)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i);