(no commit message)
[oweals/gnunet.git] / src / fs / test_fs_list_indexed.c
index 1221ff6c4476f008da5cc84a49a2cad5c7406aea..206e58bafeb26c321dea04a0c6b8703b930b7af1 100644 (file)
@@ -56,7 +56,7 @@ struct PeerContext
 {
   struct GNUNET_CONFIGURATION_Handle *cfg;
 #if START_ARM
-  GNUNET_OS_Process *arm_proc;
+  struct GNUNET_OS_Process *arm_proc;
 #endif
 };
 
@@ -64,8 +64,6 @@ static struct PeerContext p1;
 
 static struct GNUNET_TIME_Absolute start;
 
-static struct GNUNET_SCHEDULER_Handle *sched;
-
 static struct GNUNET_FS_Handle *fs;
 
 static struct GNUNET_FS_PublishContext *publish;
@@ -96,8 +94,7 @@ list_indexed_task (void *cls,
                   const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  GNUNET_SCHEDULER_add_continuation (sched,
-                                    &abort_publish_task,
+  GNUNET_SCHEDULER_add_continuation (&abort_publish_task,
                                     NULL,
                                     GNUNET_SCHEDULER_REASON_PREREQ_DONE);
 }
@@ -118,8 +115,7 @@ progress_cb (void *cls,
              (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
       if (0 == strcmp ("list_indexed-context-dir", 
                       event->value.publish.cctx))      
-       GNUNET_SCHEDULER_add_continuation (sched,
-                                          &list_indexed_task,
+       GNUNET_SCHEDULER_add_continuation (&list_indexed_task,
                                           NULL,
                                           GNUNET_SCHEDULER_REASON_PREREQ_DONE);
        
@@ -143,8 +139,7 @@ progress_cb (void *cls,
       err = 1;
       if (0 == strcmp ("list_indexed-context-dir", 
                       event->value.publish.cctx))              
-       GNUNET_SCHEDULER_add_continuation (sched,
-                                          &abort_publish_task,
+       GNUNET_SCHEDULER_add_continuation (&abort_publish_task,
                                           NULL,
                                           GNUNET_SCHEDULER_REASON_PREREQ_DONE);
       break;
@@ -229,7 +224,6 @@ stop_arm (struct PeerContext *p)
 
 static void
 run (void *cls,
-     struct GNUNET_SCHEDULER_Handle *s,
      char *const *args,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -246,10 +240,8 @@ run (void *cls,
   struct GNUNET_FS_FileInformation *fidir;
   size_t i;
 
-  sched = s;
   setup_peer (&p1, "test_fs_list_indexed_data.conf");
-  fs = GNUNET_FS_start (sched,
-                       cfg,
+  fs = GNUNET_FS_start (cfg,
                        "test-fs-list_indexed",
                        &progress_cb,
                        NULL,