aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_list_indexed.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-11-05 18:21:50 +0000
committerNathan S. Evans <evans@in.tum.de>2010-11-05 18:21:50 +0000
commit75a33a1499cf60ea4364c9aa673816629a6c1413 (patch)
tree0620da4312bb04de4d7b65074fdd3b0c3dd6cc0e /src/fs/test_fs_list_indexed.c
parent7217c601ad30760872823193d62307e7a335d226 (diff)
downloadgnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.tar.gz
gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.zip
big scheduler refactoring, expect some issues
Diffstat (limited to 'src/fs/test_fs_list_indexed.c')
-rw-r--r--src/fs/test_fs_list_indexed.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c
index 0e46336df..206e58baf 100644
--- a/src/fs/test_fs_list_indexed.c
+++ b/src/fs/test_fs_list_indexed.c
@@ -64,8 +64,6 @@ static struct PeerContext p1;
64 64
65static struct GNUNET_TIME_Absolute start; 65static struct GNUNET_TIME_Absolute start;
66 66
67static struct GNUNET_SCHEDULER_Handle *sched;
68
69static struct GNUNET_FS_Handle *fs; 67static struct GNUNET_FS_Handle *fs;
70 68
71static struct GNUNET_FS_PublishContext *publish; 69static struct GNUNET_FS_PublishContext *publish;
@@ -96,8 +94,7 @@ list_indexed_task (void *cls,
96 const struct GNUNET_SCHEDULER_TaskContext *tc) 94 const struct GNUNET_SCHEDULER_TaskContext *tc)
97{ 95{
98 96
99 GNUNET_SCHEDULER_add_continuation (sched, 97 GNUNET_SCHEDULER_add_continuation (&abort_publish_task,
100 &abort_publish_task,
101 NULL, 98 NULL,
102 GNUNET_SCHEDULER_REASON_PREREQ_DONE); 99 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
103} 100}
@@ -118,8 +115,7 @@ progress_cb (void *cls,
118 (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024)); 115 (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
119 if (0 == strcmp ("list_indexed-context-dir", 116 if (0 == strcmp ("list_indexed-context-dir",
120 event->value.publish.cctx)) 117 event->value.publish.cctx))
121 GNUNET_SCHEDULER_add_continuation (sched, 118 GNUNET_SCHEDULER_add_continuation (&list_indexed_task,
122 &list_indexed_task,
123 NULL, 119 NULL,
124 GNUNET_SCHEDULER_REASON_PREREQ_DONE); 120 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
125 121
@@ -143,8 +139,7 @@ progress_cb (void *cls,
143 err = 1; 139 err = 1;
144 if (0 == strcmp ("list_indexed-context-dir", 140 if (0 == strcmp ("list_indexed-context-dir",
145 event->value.publish.cctx)) 141 event->value.publish.cctx))
146 GNUNET_SCHEDULER_add_continuation (sched, 142 GNUNET_SCHEDULER_add_continuation (&abort_publish_task,
147 &abort_publish_task,
148 NULL, 143 NULL,
149 GNUNET_SCHEDULER_REASON_PREREQ_DONE); 144 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
150 break; 145 break;
@@ -229,7 +224,6 @@ stop_arm (struct PeerContext *p)
229 224
230static void 225static void
231run (void *cls, 226run (void *cls,
232 struct GNUNET_SCHEDULER_Handle *s,
233 char *const *args, 227 char *const *args,
234 const char *cfgfile, 228 const char *cfgfile,
235 const struct GNUNET_CONFIGURATION_Handle *cfg) 229 const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -246,10 +240,8 @@ run (void *cls,
246 struct GNUNET_FS_FileInformation *fidir; 240 struct GNUNET_FS_FileInformation *fidir;
247 size_t i; 241 size_t i;
248 242
249 sched = s;
250 setup_peer (&p1, "test_fs_list_indexed_data.conf"); 243 setup_peer (&p1, "test_fs_list_indexed_data.conf");
251 fs = GNUNET_FS_start (sched, 244 fs = GNUNET_FS_start (cfg,
252 cfg,
253 "test-fs-list_indexed", 245 "test-fs-list_indexed",
254 &progress_cb, 246 &progress_cb,
255 NULL, 247 NULL,