-fixes
[oweals/gnunet.git] / src / fs / test_fs_download_persistence.c
index 5b2a53f801b093bc2b1fcc39b3df2487c382d144..bcb1c54b66d587ac8bbeb6d79db6a30f59fa9665 100644 (file)
@@ -123,8 +123,8 @@ abort_download_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -138,8 +138,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 
 /**
- * Consider scheduling the restart-task. 
- * Only runs the restart task once per event 
+ * Consider scheduling the restart-task.
+ * Only runs the restart task once per event
  * category.
  *
  * @param ev type of the event to consider
@@ -171,16 +171,16 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     GNUNET_assert (download == NULL);
@@ -194,8 +194,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Download complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -206,19 +206,19 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.download.completed,
             (unsigned long long) event->value.download.size,
             event->value.download.specifics.progress.depth,
-            (unsigned long long) event->value.download.specifics.progress.
-            offset);
+            (unsigned long long) event->value.download.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
-    fprintf (stderr, "Error downloading file: %s\n",
+    FPRINTF (stderr, "Error downloading file: %s\n",
              event->value.download.specifics.error.message);
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
@@ -295,7 +295,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
   p->cfg = GNUNET_CONFIGURATION_create ();
 #if START_ARM
   p->arm_proc =
-      GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+    GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
                                "gnunet-service-arm",
 #if VERBOSE
                                "-L", "DEBUG",