new operation queue for limiting overlay connects
[oweals/gnunet.git] / src / transport / test_transport_startonly.c
index 0f3e88b1f0a8da127d7d979f16e0eaac214fc0e2..8a8fef161142b52b256d47cdec420d48b43f3b65 100644 (file)
@@ -59,6 +59,7 @@ end ()
     GNUNET_SCHEDULER_cancel (timeout_task);
     timeout_task = GNUNET_SCHEDULER_NO_TASK;
   }
+  GNUNET_TRANSPORT_TESTING_done (tth);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting\n");
 }
 
@@ -73,7 +74,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (p1 != NULL)
     GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1);
-
+  if (NULL != tth)
+    GNUNET_TRANSPORT_TESTING_done (tth);
   ret = GNUNET_SYSERR;
 }
 
@@ -137,8 +139,6 @@ run (void *cls, char *const *args, const char *cfgfile,
       FPRINTF (stderr, "..%i", i);
   }
 
-  tth = GNUNET_TRANSPORT_TESTING_init ();
-
   FPRINTF (stderr, "%s",  "\n");
   end ();
 }