From a108a1ec6a4b299f3a6db7d9bb0a507188a2d0bb Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 20 Jun 2012 19:15:35 +0000 Subject: [PATCH] -fixed assertion failure when GNUNET_TESTING_peer_shutdown is called in GNUNET_TESTING_peer/service_run --- src/testing/testing.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/testing/testing.c b/src/testing/testing.c index 6d22c68ce..ce3ad8c76 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -1005,9 +1005,7 @@ GNUNET_TESTING_service_run (const char *testdir, struct GNUNET_TESTING_Peer *peer; struct GNUNET_CONFIGURATION_Handle *cfg; - GNUNET_log_setup (testdir, - "WARNING", - NULL); + GNUNET_log_setup (testdir, "WARNING", NULL); system = GNUNET_TESTING_system_create (testdir, "127.0.0.1"); if (NULL == system) return 1; @@ -1042,7 +1040,8 @@ GNUNET_TESTING_service_run (const char *testdir, sc.tm_cls = tm_cls; sc.peer = peer; GNUNET_SCHEDULER_run (&service_run_main, &sc); /* Scheduler loop */ - if (GNUNET_OK != GNUNET_TESTING_peer_stop (peer)) + if ((NULL != peer->main_process) && + (GNUNET_OK != GNUNET_TESTING_peer_stop (peer))) { GNUNET_TESTING_peer_destroy (peer); GNUNET_CONFIGURATION_destroy (cfg); -- 2.25.1