From 7c16cd31adbefb4a11cf94b051568500a13ca355 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Wed, 23 Jun 2010 09:12:26 +0000 Subject: [PATCH] don't stop churned peers, clean up files --- src/testing/testing.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/testing/testing.c b/src/testing/testing.c index c21650300..92eefa76e 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -951,6 +951,23 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d, return; } + if ((d->running == GNUNET_NO) && (d->churn == GNUNET_YES)) /* Peer has already been stopped in churn context! */ + { + /* Free what was left from churning! */ + GNUNET_assert(d->cfg != NULL); + GNUNET_CONFIGURATION_destroy (d->cfg); + if (delete_files == GNUNET_YES) + { + UNLINK(d->cfgfile); + } + GNUNET_free (d->cfgfile); + GNUNET_free_non_null (d->hostname); + GNUNET_free_non_null (d->username); + if (NULL != d->dead_cb) + d->dead_cb (d->dead_cb_cls, NULL); + return; + } + del_arg = NULL; if (delete_files == GNUNET_YES) { -- 2.25.1