progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
{
const char *s;
+ char *suri;
switch (info->status)
{
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
FPRINTF (stdout, _("Publishing `%s' done.\n"),
info->value.publish.filename);
- s = GNUNET_FS_uri_to_string (info->value.publish.specifics.
+ suri = GNUNET_FS_uri_to_string (info->value.publish.specifics.
completed.chk_uri);
- FPRINTF (stdout, _("URI is `%s'.\n"), s);
- GNUNET_free (s);
+ FPRINTF (stdout, _("URI is `%s'.\n"), suri);
+ GNUNET_free (suri);
if (info->value.publish.pctx == NULL)
{
if (kill_task != GNUNET_SCHEDULER_NO_TASK)
0, &GNUNET_GETOPT_set_one, &verbose},
GNUNET_GETOPT_OPTION_END
};
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "GNUnet publish starts\n");
bo.expiration_time =
GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2);
if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
return 2;
-
- return (GNUNET_OK ==
- GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME",
- gettext_noop
- ("Publish a file or directory on GNUnet"),
- options, &run, NULL)) ? ret : 1;
+ ret = (GNUNET_OK ==
+ GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME",
+ gettext_noop
+ ("Publish a file or directory on GNUnet"),
+ options, &run, NULL)) ? ret : 1;
+ GNUNET_free ((void*) argv);
+ return ret;
}
/* end of gnunet-publish.c */