fixed memory leak
[oweals/gnunet.git] / src / testbed / gnunet-testbed-profiler.c
index 675912e137f6afdcc714fa8132fab57b9c6b6ee2..7b42188902f2c31894374aa71e030968c6409d61 100644 (file)
@@ -33,7 +33,7 @@
  * Generic loggins shorthand
  */
 #define LOG(kind,...)                                           \
-  GNUNET_log_from (kind, "testbed-api-testbed", __VA_ARGS__)
+  GNUNET_log (kind, __VA_ARGS__)
 
 /**
  * DLL of operations
@@ -249,7 +249,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static void
 do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Aborting\n");
+  LOG (GNUNET_ERROR_TYPE_WARNING, "Aborting\n");
   abort_task = GNUNET_SCHEDULER_NO_TASK;
   result = GNUNET_SYSERR;
   GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
@@ -442,7 +442,7 @@ controller_event_cb (void *cls,
       if (NULL != event->details.operation_finished.emsg)
       {
         LOG (GNUNET_ERROR_TYPE_WARNING,
-             _("An operation has failed while starting slaves\n"));
+             _("An operation has failed while linking\n"));
         GNUNET_SCHEDULER_cancel (abort_task);
         abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
       }
@@ -451,13 +451,16 @@ controller_event_cb (void *cls,
       {
         static unsigned int established_links;
 
+       if (0 == established_links)
+         printf ("Establishing links\n");
+       else
+         printf (".");
         if (++established_links == num_links)
         {
           prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time);
           printf ("%u links established in %.2f seconds\n",
                   num_links, ((double) prof_time.rel_value) / 1000.00);
-          GNUNET_TESTBED_operation_done (topology_op);
-          topology_op = NULL;
+         result = GNUNET_OK;
           GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
         }
       }