diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-20 19:15:35 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-20 19:15:35 +0000 |
commit | a108a1ec6a4b299f3a6db7d9bb0a507188a2d0bb (patch) | |
tree | bca2e5f758311f1f7baa37956d7d7d4ec8661c36 /src/testing | |
parent | 653e181509c0798bf9ca999a2141d7e2a6552aef (diff) | |
download | gnunet-a108a1ec6a4b299f3a6db7d9bb0a507188a2d0bb.tar.gz gnunet-a108a1ec6a4b299f3a6db7d9bb0a507188a2d0bb.zip |
-fixed assertion failure when GNUNET_TESTING_peer_shutdown is called in GNUNET_TESTING_peer/service_run
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing.c | 7 |
1 files 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, | |||
1005 | struct GNUNET_TESTING_Peer *peer; | 1005 | struct GNUNET_TESTING_Peer *peer; |
1006 | struct GNUNET_CONFIGURATION_Handle *cfg; | 1006 | struct GNUNET_CONFIGURATION_Handle *cfg; |
1007 | 1007 | ||
1008 | GNUNET_log_setup (testdir, | 1008 | GNUNET_log_setup (testdir, "WARNING", NULL); |
1009 | "WARNING", | ||
1010 | NULL); | ||
1011 | system = GNUNET_TESTING_system_create (testdir, "127.0.0.1"); | 1009 | system = GNUNET_TESTING_system_create (testdir, "127.0.0.1"); |
1012 | if (NULL == system) | 1010 | if (NULL == system) |
1013 | return 1; | 1011 | return 1; |
@@ -1042,7 +1040,8 @@ GNUNET_TESTING_service_run (const char *testdir, | |||
1042 | sc.tm_cls = tm_cls; | 1040 | sc.tm_cls = tm_cls; |
1043 | sc.peer = peer; | 1041 | sc.peer = peer; |
1044 | GNUNET_SCHEDULER_run (&service_run_main, &sc); /* Scheduler loop */ | 1042 | GNUNET_SCHEDULER_run (&service_run_main, &sc); /* Scheduler loop */ |
1045 | if (GNUNET_OK != GNUNET_TESTING_peer_stop (peer)) | 1043 | if ((NULL != peer->main_process) && |
1044 | (GNUNET_OK != GNUNET_TESTING_peer_stop (peer))) | ||
1046 | { | 1045 | { |
1047 | GNUNET_TESTING_peer_destroy (peer); | 1046 | GNUNET_TESTING_peer_destroy (peer); |
1048 | GNUNET_CONFIGURATION_destroy (cfg); | 1047 | GNUNET_CONFIGURATION_destroy (cfg); |