aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-27 10:43:18 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-27 10:43:18 +0000
commit315a5cc108293e1ac8f8aaa8fda5c9a7bbd71531 (patch)
treeeea7d171b621f287c13280f6be5f4ee9070ce569 /src/testing/testing.c
parentbbad719b371981f8eee4e9a22c74767140894a46 (diff)
downloadgnunet-315a5cc108293e1ac8f8aaa8fda5c9a7bbd71531.tar.gz
gnunet-315a5cc108293e1ac8f8aaa8fda5c9a7bbd71531.zip
api for controlled churn
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index adcc06193..0c650d313 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -922,7 +922,8 @@ void
922GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d, 922GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
923 struct GNUNET_TIME_Relative timeout, 923 struct GNUNET_TIME_Relative timeout,
924 GNUNET_TESTING_NotifyCompletion cb, void *cb_cls, 924 GNUNET_TESTING_NotifyCompletion cb, void *cb_cls,
925 int delete_files, int allow_restart) 925 int delete_files,
926 int allow_restart)
926{ 927{
927 char *arg; 928 char *arg;
928 char *del_arg; 929 char *del_arg;
@@ -960,13 +961,10 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
960 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 961 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
961 _("Terminating peer `%4s'\n"), GNUNET_i2s (&d->id)); 962 _("Terminating peer `%4s'\n"), GNUNET_i2s (&d->id));
962#endif 963#endif
963
964 d->phase = SP_SHUTDOWN_START; 964 d->phase = SP_SHUTDOWN_START;
965 d->running = GNUNET_NO; 965 d->running = GNUNET_NO;
966
967 if (allow_restart == GNUNET_YES) 966 if (allow_restart == GNUNET_YES)
968 d->churn = GNUNET_YES; 967 d->churn = GNUNET_YES;
969
970 if (d->th != NULL) 968 if (d->th != NULL)
971 { 969 {
972 GNUNET_TRANSPORT_get_hello_cancel(d->th, &process_hello, d); 970 GNUNET_TRANSPORT_get_hello_cancel(d->th, &process_hello, d);
@@ -993,7 +991,6 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
993#endif 991#endif
994 "-c", d->cfgfile, "-e", "-q", del_arg, NULL); 992 "-c", d->cfgfile, "-e", "-q", del_arg, NULL);
995 /* Use -e to end arm, and -d to remove temp files */ 993 /* Use -e to end arm, and -d to remove temp files */
996
997 GNUNET_free (arg); 994 GNUNET_free (arg);
998 } 995 }
999 else 996 else