diff options
Diffstat (limited to 'src/fs/test_gnunet_service_fs_migration.c')
-rw-r--r-- | src/fs/test_gnunet_service_fs_migration.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index f00290b0d..2ff495ac3 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c | |||
@@ -142,15 +142,13 @@ static void | |||
142 | stop_source_peer (void *cls) | 142 | stop_source_peer (void *cls) |
143 | { | 143 | { |
144 | struct DownloadContext *dc = cls; | 144 | struct DownloadContext *dc = cls; |
145 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
146 | 145 | ||
147 | tc = GNUNET_SCHEDULER_get_task_context (); | 146 | /* FIXME: We should not interact with testbed when shutting down */ |
148 | /* Do not interact with testbed when shutting down */ | ||
149 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | ||
150 | return; | ||
151 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 147 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
152 | "Stopping source peer\n"); | 148 | "Stopping source peer\n"); |
153 | op = GNUNET_TESTBED_peer_stop (NULL, daemons[1], &do_download, dc); | 149 | op = GNUNET_TESTBED_peer_stop (NULL, |
150 | daemons[1], | ||
151 | &do_download, dc); | ||
154 | GNUNET_assert (NULL != op); | 152 | GNUNET_assert (NULL != op); |
155 | } | 153 | } |
156 | 154 | ||
@@ -176,7 +174,9 @@ do_wait (void *cls, | |||
176 | dc->uri = GNUNET_FS_uri_dup (uri); | 174 | dc->uri = GNUNET_FS_uri_dup (uri); |
177 | if (NULL != fn) | 175 | if (NULL != fn) |
178 | dc->fn = GNUNET_strdup (fn); | 176 | dc->fn = GNUNET_strdup (fn); |
179 | (void) GNUNET_SCHEDULER_add_delayed (MIGRATION_DELAY, &stop_source_peer, dc); | 177 | (void) GNUNET_SCHEDULER_add_delayed (MIGRATION_DELAY, |
178 | &stop_source_peer, | ||
179 | dc); | ||
180 | } | 180 | } |
181 | 181 | ||
182 | 182 | ||
@@ -196,7 +196,8 @@ do_publish (void *cls, | |||
196 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 196 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
197 | "Publishing %llu bytes\n", | 197 | "Publishing %llu bytes\n", |
198 | (unsigned long long) FILESIZE); | 198 | (unsigned long long) FILESIZE); |
199 | GNUNET_FS_TEST_publish (daemons[1], TIMEOUT, 1, GNUNET_NO, FILESIZE, SEED, | 199 | GNUNET_FS_TEST_publish (daemons[1], TIMEOUT, 1, GNUNET_NO, |
200 | FILESIZE, SEED, | ||
200 | VERBOSE, &do_wait, NULL); | 201 | VERBOSE, &do_wait, NULL); |
201 | } | 202 | } |
202 | 203 | ||