X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftransport%2Ftest_transport_testing.c;h=7875f1cfa191709382eb386b6529ba37e63eaa10;hb=56389a7d277b05c9c2968b7ebd529a12f8be15eb;hp=be8c547cc5d06399040442a63f4203c0ff31449e;hpb=ecdc64b5af16246777bb2a4cab79e203fe462a66;p=oweals%2Fgnunet.git diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c index be8c547cc..7875f1cfa 100644 --- a/src/transport/test_transport_testing.c +++ b/src/transport/test_transport_testing.c @@ -27,22 +27,8 @@ * 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_EXTRA_LOGGING - -#define VERBOSE_ARM GNUNET_EXTRA_LOGGING - -#define START_ARM GNUNET_YES - /** * How long until we give up on transmitting the message? */ @@ -81,6 +67,12 @@ end_badly () timeout_task = GNUNET_SCHEDULER_NO_TASK; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); + if (NULL != cc) + { + GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc); + cc = NULL; + } + if (p1 != NULL) GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); if (p2 != NULL) @@ -167,15 +159,11 @@ run (void *cls, char *const *args, const char *cfgfile, 1, ¬ify_receive, ¬ify_connect, ¬ify_disconnect, &start_cb, p1); - GNUNET_assert (p1->hostkeyfile != NULL); - p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_api_tcp_peer2.conf", 2, ¬ify_receive, ¬ify_connect, ¬ify_disconnect, &start_cb, p2); - GNUNET_assert (p2->hostkeyfile != NULL); - if (p1 == NULL) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -198,19 +186,12 @@ int main (int argc, char *argv[]) { GNUNET_log_setup ("test_transport_testing", -#if VERBOSE - "DEBUG", -#else "WARNING", -#endif NULL); char *const argv_1[] = { "test_transport_testing", "-c", "test_transport_api_data.conf", -#if VERBOSE - "-L", "DEBUG", -#endif NULL };