/**
- * Called by FS client to give information about the progress of an
+ * Called by FS client to give information about the progress of an
* operation.
*
* @param cls closure
{
case GNUNET_FS_STATUS_DOWNLOAD_START:
if (verbose > 1)
- fprintf (stderr,
- _("Starting download `%s'.\n"), info->value.download.filename);
+ fprintf (stderr, _("Starting download `%s'.\n"),
+ info->value.download.filename);
break;
case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
if (verbose)
}
break;
case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
- fprintf (stderr,
- _("Error downloading: %s.\n"),
+ fprintf (stderr, _("Error downloading: %s.\n"),
info->value.download.specifics.error.message);
GNUNET_SCHEDULER_shutdown ();
break;
break;
case GNUNET_FS_STATUS_DOWNLOAD_STOPPED:
if (info->value.download.dc == dc)
- GNUNET_SCHEDULER_add_continuation (&cleanup_task,
- NULL,
+ GNUNET_SCHEDULER_add_continuation (&cleanup_task, NULL,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
break;
case GNUNET_FS_STATUS_DOWNLOAD_ACTIVE:
* @param c configuration
*/
static void
-run (void *cls,
- char *const *args,
- const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
+run (void *cls, char *const *args, const char *cfgfile,
+ const struct GNUNET_CONFIGURATION_Handle *c)
{
struct GNUNET_FS_Uri *uri;
char *emsg;
return;
}
cfg = c;
- ctx = GNUNET_FS_start (cfg,
- "gnunet-download",
- &progress_cb,
- NULL,
- GNUNET_FS_FLAGS_NONE,
- GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM,
- parallelism,
- GNUNET_FS_OPTIONS_REQUEST_PARALLELISM,
- request_parallelism, GNUNET_FS_OPTIONS_END);
+ ctx =
+ GNUNET_FS_start (cfg, "gnunet-download", &progress_cb, NULL,
+ GNUNET_FS_FLAGS_NONE,
+ GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM, parallelism,
+ GNUNET_FS_OPTIONS_REQUEST_PARALLELISM,
+ request_parallelism, GNUNET_FS_OPTIONS_END);
if (NULL == ctx)
{
fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
options |= GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE;
if (local_only)
options |= GNUNET_FS_DOWNLOAD_OPTION_LOOPBACK_ONLY;
- dc = GNUNET_FS_download_start (ctx,
- uri,
- NULL,
- filename, NULL,
- 0,
+ dc = GNUNET_FS_download_start (ctx, uri, NULL, filename, NULL, 0,
GNUNET_FS_uri_chk_get_file_size (uri),
anonymity, options, NULL, NULL);
GNUNET_FS_uri_destroy (uri);
ctx = NULL;
return;
}
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &shutdown_task, NULL);
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
+ NULL);
}
GNUNET_GETOPT_OPTION_END
};
return (GNUNET_OK ==
- GNUNET_PROGRAM_run (argc,
- argv,
- "gnunet-download [OPTIONS] URI",
+ GNUNET_PROGRAM_run (argc, argv, "gnunet-download [OPTIONS] URI",
gettext_noop
("Download files from GNUnet using a GNUnet CHK or LOC URI (gnunet://fs/chk/...)"),
options, &run, NULL)) ? ret : 1;