new operation queue for limiting overlay connects
[oweals/gnunet.git] / src / transport / test_transport_api_limited_sockets.c
index e6ad84a22719daa7407289ed7656b5830feedb20..e3c294a1c8ab6a58f811e3caa3a592138cef337d 100644 (file)
  * C code apparently.
  */
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
 #include "gnunet_transport_service.h"
-#include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
 /**
  * How long until we give up on transmitting the message?
  */
@@ -107,6 +94,8 @@ end ()
 
   GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1);
   GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
+  GNUNET_TRANSPORT_TESTING_done (tth);
+
 }
 
 static void
@@ -131,6 +120,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (p2 != NULL)
     GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
 
+  if (NULL != th)
+    GNUNET_TRANSPORT_TESTING_done (tth);
+
   ok = GNUNET_SYSERR;
 }
 
@@ -241,7 +233,7 @@ start_cb (struct PeerContext *p, void *cls)
   if (started != 2)
     return;
 
-  cc = GNUNET_TRANSPORT_TESTING_connect_peers (tth, p1, p2, &testing_connect_cb,
+  cc = GNUNET_TRANSPORT_TESTING_connect_peers (tth, p2, p1, &testing_connect_cb,
                                                NULL);
 
 }