diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-01-20 14:20:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-01-20 14:20:30 +0000 |
commit | c9432075d84d3c50171367e7d648a3a09f431994 (patch) | |
tree | 816f97d3601f6f255354267225c3b43b076fdac7 /src/fs/test_fs_download_persistence.c | |
parent | 81dfe20c8ee82d202244766f2914683a63d078ca (diff) | |
download | gnunet-c9432075d84d3c50171367e7d648a3a09f431994.tar.gz gnunet-c9432075d84d3c50171367e7d648a3a09f431994.zip |
major rewrite of fs_download, hopefully fixing 1641
Diffstat (limited to 'src/fs/test_fs_download_persistence.c')
-rw-r--r-- | src/fs/test_fs_download_persistence.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index e00d5255d..0ea7a5524 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c | |||
@@ -78,6 +78,8 @@ static void | |||
78 | timeout_kill_task (void *cls, | 78 | timeout_kill_task (void *cls, |
79 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 79 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
80 | { | 80 | { |
81 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
82 | "Timeout downloading file\n"); | ||
81 | if (download != NULL) | 83 | if (download != NULL) |
82 | { | 84 | { |
83 | GNUNET_FS_download_stop (download, GNUNET_YES); | 85 | GNUNET_FS_download_stop (download, GNUNET_YES); |
@@ -134,6 +136,8 @@ static void | |||
134 | restart_fs_task (void *cls, | 136 | restart_fs_task (void *cls, |
135 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 137 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
136 | { | 138 | { |
139 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
140 | "Restarting FS.\n"); | ||
137 | GNUNET_FS_stop (fs); | 141 | GNUNET_FS_stop (fs); |
138 | fs = GNUNET_FS_start (cfg, | 142 | fs = GNUNET_FS_start (cfg, |
139 | "test-fs-download-persistence", | 143 | "test-fs-download-persistence", |
@@ -242,18 +246,26 @@ progress_cb (void *cls, | |||
242 | publish = event->value.publish.pc; | 246 | publish = event->value.publish.pc; |
243 | break; | 247 | break; |
244 | case GNUNET_FS_STATUS_DOWNLOAD_SUSPEND: | 248 | case GNUNET_FS_STATUS_DOWNLOAD_SUSPEND: |
249 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
250 | "Download suspended.\n"); | ||
245 | GNUNET_assert (event->value.download.dc == download); | 251 | GNUNET_assert (event->value.download.dc == download); |
246 | download = NULL; | 252 | download = NULL; |
247 | break; | 253 | break; |
248 | case GNUNET_FS_STATUS_DOWNLOAD_RESUME: | 254 | case GNUNET_FS_STATUS_DOWNLOAD_RESUME: |
249 | GNUNET_assert (NULL == download); | 255 | GNUNET_assert (NULL == download); |
250 | download = event->value.download.dc; | 256 | download = event->value.download.dc; |
257 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
258 | "Download resumed.\n"); | ||
251 | break; | 259 | break; |
252 | case GNUNET_FS_STATUS_DOWNLOAD_ACTIVE: | 260 | case GNUNET_FS_STATUS_DOWNLOAD_ACTIVE: |
253 | consider_restart (event->status); | 261 | consider_restart (event->status); |
262 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
263 | "Download active.\n"); | ||
254 | break; | 264 | break; |
255 | case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: | 265 | case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: |
256 | consider_restart (event->status); | 266 | consider_restart (event->status); |
267 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
268 | "Download inactive.\n"); | ||
257 | break; | 269 | break; |
258 | case GNUNET_FS_STATUS_PUBLISH_START: | 270 | case GNUNET_FS_STATUS_PUBLISH_START: |
259 | GNUNET_assert (0 == strcmp ("publish-context", event->value.publish.cctx)); | 271 | GNUNET_assert (0 == strcmp ("publish-context", event->value.publish.cctx)); |
@@ -270,6 +282,8 @@ progress_cb (void *cls, | |||
270 | fs = NULL; | 282 | fs = NULL; |
271 | break; | 283 | break; |
272 | case GNUNET_FS_STATUS_DOWNLOAD_START: | 284 | case GNUNET_FS_STATUS_DOWNLOAD_START: |
285 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
286 | "Download started.\n"); | ||
273 | consider_restart (event->status); | 287 | consider_restart (event->status); |
274 | GNUNET_assert (download == NULL); | 288 | GNUNET_assert (download == NULL); |
275 | download = event->value.download.dc; | 289 | download = event->value.download.dc; |