style improvments wrt Mantis 1614 patch
[oweals/gnunet.git] / src / testing / test_testing_topology.c
index dd8a164191d37eb8268aaaa93fff7c548d122fb9..7ca58faf1af7297b99088e8850b7ff4472c7d948 100644 (file)
@@ -179,12 +179,14 @@ static void gather_log_data ()
 {
   char *peer_number;
   char *connect_number;
-  pid_t mem_process;
+  struct GNUNET_OS_Process *mem_process;
   GNUNET_asprintf(&peer_number, "%llu", num_peers);
   GNUNET_asprintf(&connect_number, "%llu", expected_connections);
   mem_process = GNUNET_OS_start_process (NULL, NULL, "./memsize.pl",
                            "memsize.pl", "totals.txt", peer_number, connect_number, NULL);
-  GNUNET_OS_process_wait(mem_process);
+  GNUNET_OS_process_wait (mem_process);
+  GNUNET_OS_process_close (mem_process);
+  mem_process = NULL;
 }
 
 #endif
@@ -539,7 +541,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
 {
   struct TestMessageContext *pos = cls;
 
-  if ((pos == test_messages) && (settle_time.value > 0))
+  if ((pos == test_messages) && (settle_time.rel_value > 0))
     {
       topology_connections = 0;
       GNUNET_TESTING_get_topology (pg, &topology_cb, NULL);
@@ -670,7 +672,7 @@ topology_callback (void *cls,
                                     &send_test_messages, test_messages);
       gather_log_data();
 #else
-      if (settle_time.value > 0)
+      if (settle_time.rel_value > 0)
         {
           GNUNET_TESTING_get_topology (pg, &topology_cb, NULL);
         }
@@ -1001,7 +1003,7 @@ run (void *cls,
   modnum = num_peers / 4;
   dotnum = (num_peers / 50) + 1;
 #if VERBOSE
-  fprintf (stdout, "Hostkey generation progress: \[");
+  fprintf (stdout, "Hostkey generation progress: [");
 #endif
   /* Set up a task to end testing if peer start fails */
   die_task = GNUNET_SCHEDULER_add_delayed (sched,