Add missing include
[oweals/gnunet.git] / src / consensus / gnunet-consensus-profiler.c
index 89fd6bf23c45fb32f9ab676375b547012efc889d..bade332b5996270fd3305f3a4db0cb431b14b143 100644 (file)
@@ -4,7 +4,7 @@
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
-      by the Free Software Foundation; either version 2, or (at your
+      by the Free Software Foundation; either version 3, or (at your
       option) any later version.
 
       GNUnet is distributed in the hope that it will be useful, but
@@ -24,7 +24,6 @@
  * @author Florian Dold
  */
 #include "platform.h"
-#include "gnunet_common.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_consensus_service.h"
 #include "gnunet_testbed_service.h"
@@ -207,7 +206,7 @@ new_element_cb (void *cls,
   int idx = chp - consensus_handles;
 
   GNUNET_assert (NULL != cls);
-  
+
   results_for_peer[idx]++;
 
   GNUNET_assert (sizeof (struct GNUNET_HashCode) == element->size);
@@ -303,6 +302,7 @@ peer_info_cb (void *cb_cls,
  * Signature of a main function for a testcase.
  *
  * @param cls closure
+ * @param h the run handle
  * @param num_peers number of peers in 'peers'
  * @param started_peers handle to peers run in the testbed.  NULL upon timeout (see
  *          GNUNET_TESTBED_test_run()).
@@ -313,6 +313,7 @@ peer_info_cb (void *cb_cls,
  */
 static void
 test_master (void *cls,
+             struct GNUNET_TESTBED_RunHandle *h,
              unsigned int num_peers,
              struct GNUNET_TESTBED_Peer **started_peers,
              unsigned int links_succeeded,
@@ -345,6 +346,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 {
   static char *session_str = "gnunet-consensus/test";
   char *topology;
+  int topology_cmp_result;
 
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "testbed", "OVERLAY_TOPOLOGY", &topology))
   {
@@ -353,15 +355,16 @@ run (void *cls, char *const *args, const char *cfgfile,
     return;
   }
 
-  if (0 == strcasecmp (topology, "NONE"))
+  topology_cmp_result = strcasecmp (topology, "NONE");
+  GNUNET_free (topology);
+
+  if (0 == topology_cmp_result)
   {
     fprintf (stderr, "'OVERLAY_TOPOLOGY' set to 'NONE', "
                      "seems like you passed the wrong configuration file\n");
     return;
   }
 
-  GNUNET_free (topology);
-
   if (num_peers < replication)
   {
     fprintf (stderr, "k must be <=n\n");