aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_publish.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_publish.c
parent7217c601ad30760872823193d62307e7a335d226 (diff)
downloadgnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.tar.gz
gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.zip
big scheduler refactoring, expect some issues
Diffstat (limited to 'src/fs/test_fs_publish.c')
-rw-r--r--src/fs/test_fs_publish.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c
index b5472ca93..327fa5a69 100644
--- a/src/fs/test_fs_publish.c
+++ b/src/fs/test_fs_publish.c
@@ -61,8 +61,6 @@ static struct PeerContext p1;
61 61
62static struct GNUNET_TIME_Absolute start; 62static struct GNUNET_TIME_Absolute start;
63 63
64static struct GNUNET_SCHEDULER_Handle *sched;
65
66static struct GNUNET_FS_Handle *fs; 64static struct GNUNET_FS_Handle *fs;
67 65
68static struct GNUNET_FS_PublishContext *publish; 66static struct GNUNET_FS_PublishContext *publish;
@@ -103,8 +101,7 @@ progress_cb (void *cls,
103 (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024)); 101 (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
104 if (0 == strcmp ("publish-context-dir", 102 if (0 == strcmp ("publish-context-dir",
105 event->value.publish.cctx)) 103 event->value.publish.cctx))
106 GNUNET_SCHEDULER_add_continuation (sched, 104 GNUNET_SCHEDULER_add_continuation (&abort_publish_task,
107 &abort_publish_task,
108 NULL, 105 NULL,
109 GNUNET_SCHEDULER_REASON_PREREQ_DONE); 106 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
110 break; 107 break;
@@ -130,8 +127,7 @@ progress_cb (void *cls,
130 { 127 {
131 fprintf (stderr, "Scheduling abort task for error on `%s'\n", 128 fprintf (stderr, "Scheduling abort task for error on `%s'\n",
132 (const char*) event->value.publish.cctx); 129 (const char*) event->value.publish.cctx);
133 GNUNET_SCHEDULER_add_continuation (sched, 130 GNUNET_SCHEDULER_add_continuation (&abort_publish_task,
134 &abort_publish_task,
135 NULL, 131 NULL,
136 GNUNET_SCHEDULER_REASON_PREREQ_DONE); 132 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
137 } 133 }
@@ -214,7 +210,6 @@ stop_arm (struct PeerContext *p)
214 210
215static void 211static void
216run (void *cls, 212run (void *cls,
217 struct GNUNET_SCHEDULER_Handle *s,
218 char *const *args, 213 char *const *args,
219 const char *cfgfile, 214 const char *cfgfile,
220 const struct GNUNET_CONFIGURATION_Handle *cfg) 215 const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -231,10 +226,8 @@ run (void *cls,
231 struct GNUNET_FS_FileInformation *fidir; 226 struct GNUNET_FS_FileInformation *fidir;
232 size_t i; 227 size_t i;
233 228
234 sched = s;
235 setup_peer (&p1, "test_fs_publish_data.conf"); 229 setup_peer (&p1, "test_fs_publish_data.conf");
236 fs = GNUNET_FS_start (sched, 230 fs = GNUNET_FS_start (cfg,
237 cfg,
238 "test-fs-publish", 231 "test-fs-publish",
239 &progress_cb, 232 &progress_cb,
240 NULL, 233 NULL,