diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-08-03 09:35:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-08-03 09:35:48 +0000 |
commit | d3e7a5e40dd2d5409009a30e1e41148c4d852673 (patch) | |
tree | 21ff19580a99137e9b8aec4393feb67f0f1c7b5a /src/fs/test_fs_unindex.c | |
parent | ec69ceabc67a72373a2579d871c5fe85676a73bd (diff) | |
download | gnunet-d3e7a5e40dd2d5409009a30e1e41148c4d852673.tar.gz gnunet-d3e7a5e40dd2d5409009a30e1e41148c4d852673.zip |
-use simpler, modern scheduler API
Diffstat (limited to 'src/fs/test_fs_unindex.c')
-rw-r--r-- | src/fs/test_fs_unindex.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index dcde15bc0..c7a0c7cd5 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c | |||
@@ -108,8 +108,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
108 | (1 + | 108 | (1 + |
109 | GNUNET_TIME_absolute_get_duration | 109 | GNUNET_TIME_absolute_get_duration |
110 | (start).rel_value_us) / 1024)); | 110 | (start).rel_value_us) / 1024)); |
111 | GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL, | 111 | GNUNET_SCHEDULER_add_now (&abort_unindex_task, NULL); |
112 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
113 | break; | 112 | break; |
114 | case GNUNET_FS_STATUS_UNINDEX_PROGRESS: | 113 | case GNUNET_FS_STATUS_UNINDEX_PROGRESS: |
115 | GNUNET_assert (unindex == event->value.unindex.uc); | 114 | GNUNET_assert (unindex == event->value.unindex.uc); |
@@ -125,14 +124,12 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
125 | FPRINTF (stderr, "Error publishing file: %s\n", | 124 | FPRINTF (stderr, "Error publishing file: %s\n", |
126 | event->value.publish.specifics.error.message); | 125 | event->value.publish.specifics.error.message); |
127 | GNUNET_break (0); | 126 | GNUNET_break (0); |
128 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 127 | GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL); |
129 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
130 | break; | 128 | break; |
131 | case GNUNET_FS_STATUS_UNINDEX_ERROR: | 129 | case GNUNET_FS_STATUS_UNINDEX_ERROR: |
132 | FPRINTF (stderr, "Error unindexing file: %s\n", | 130 | FPRINTF (stderr, "Error unindexing file: %s\n", |
133 | event->value.unindex.specifics.error.message); | 131 | event->value.unindex.specifics.error.message); |
134 | GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL, | 132 | GNUNET_SCHEDULER_add_now (&abort_unindex_task, NULL); |
135 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
136 | break; | 133 | break; |
137 | case GNUNET_FS_STATUS_PUBLISH_START: | 134 | case GNUNET_FS_STATUS_PUBLISH_START: |
138 | GNUNET_assert (0 == strcmp ("publish-context", event->value.publish.cctx)); | 135 | GNUNET_assert (0 == strcmp ("publish-context", event->value.publish.cctx)); |
@@ -157,8 +154,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
157 | break; | 154 | break; |
158 | case GNUNET_FS_STATUS_UNINDEX_STOPPED: | 155 | case GNUNET_FS_STATUS_UNINDEX_STOPPED: |
159 | GNUNET_assert (unindex == event->value.unindex.uc); | 156 | GNUNET_assert (unindex == event->value.unindex.uc); |
160 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 157 | GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL); |
161 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
162 | break; | 158 | break; |
163 | default: | 159 | default: |
164 | printf ("Unexpected event: %d\n", event->status); | 160 | printf ("Unexpected event: %d\n", event->status); |