{
GNUNET_CONTAINER_meta_data_destroy (meta);
meta = NULL;
- }
+ }
}
{
GNUNET_FS_directory_scan_abort (ds);
ds = NULL;
- }
+ }
if (NULL != identity)
{
GNUNET_IDENTITY_disconnect (identity);
if (GNUNET_YES == item->is_directory)
{
GNUNET_CONTAINER_meta_data_delete (item->meta,
- EXTRACTOR_METATYPE_MIMETYPE,
+ EXTRACTOR_METATYPE_MIMETYPE,
NULL, 0);
GNUNET_FS_meta_data_make_directory (item->meta);
if (NULL == item->ksk_uri)
else
GNUNET_FS_uri_ksk_add_keyword (item->ksk_uri, GNUNET_FS_DIRECTORY_MIME,
GNUNET_NO);
- fi = GNUNET_FS_file_information_create_empty_directory (ctx, NULL,
+ fi = GNUNET_FS_file_information_create_empty_directory (ctx, NULL,
item->ksk_uri,
- item->meta,
+ item->meta,
&bo, item->filename);
for (child = item->children_head; child; child = child->next)
{
}
else
{
- fi = GNUNET_FS_file_information_create_from_file (ctx, NULL,
+ fi = GNUNET_FS_file_information_create_from_file (ctx, NULL,
item->filename,
- item->ksk_uri, item->meta,
+ item->ksk_uri, item->meta,
!do_insert,
&bo);
}
priv = NULL;
else
priv = GNUNET_IDENTITY_ego_get_private_key (namespace);
- pc = GNUNET_FS_publish_start (ctx, fi,
+ pc = GNUNET_FS_publish_start (ctx, fi,
priv, this_id, next_id,
(do_simulate) ?
GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY :
* @param reason kind of progress we are making
*/
static void
-directory_scan_cb (void *cls,
- const char *filename,
+directory_scan_cb (void *cls,
+ const char *filename,
int is_directory,
enum GNUNET_FS_DirScannerProgressUpdateReason reason)
{
if (is_directory == GNUNET_YES)
FPRINTF (stdout, _("Scanning directory `%s'.\n"), filename);
else
- FPRINTF (stdout, _("Scanning file `%s'.\n"), filename);
+ FPRINTF (stdout, _("Scanning file `%s'.\n"), filename);
}
break;
case GNUNET_FS_DIRSCANNER_FILE_IGNORED:
- FPRINTF (stderr,
+ FPRINTF (stderr,
_("There was trouble processing file `%s', skipping it.\n"),
filename);
break;
case GNUNET_FS_DIRSCANNER_ALL_COUNTED:
if (verbose)
- FPRINTF (stdout, "%s", _("Preprocessing complete.\n"));
+ FPRINTF (stdout, "%s", _("Preprocessing complete.\n"));
break;
case GNUNET_FS_DIRSCANNER_EXTRACT_FINISHED:
if (verbose > 2)
- FPRINTF (stdout, _("Extracting meta data from file `%s' complete.\n"), filename);
+ FPRINTF (stdout, _("Extracting meta data from file `%s' complete.\n"), filename);
break;
case GNUNET_FS_DIRSCANNER_FINISHED:
if (verbose > 1)
* has been initialized.
*
* @param args0 filename to publish
- */
+ */
static void
identity_continuation (const char *args0)
{
_("Failed to access `%s': %s\n"),
args0,
STRERROR (errno));
+ GNUNET_free_non_null (ex);
return;
}
ds = GNUNET_FS_directory_scan_start (args0,
- disable_extractor,
- ex,
+ disable_extractor,
+ ex,
&directory_scan_cb, NULL);
if (NULL == ds)
{
FPRINTF (stderr,
"%s", _("Failed to start meta directory scanner. Is gnunet-helper-publish-fs installed?\n"));
+ GNUNET_free_non_null (ex);
return;
}
+ GNUNET_free_non_null (ex);
}
*
* @param cls closure with 'const char *' of filename to publish
* @param ego ego handle
- * @param ego_ctx context for application to store data for this ego
+ * @param ctx context for application to store data for this ego
* (during the lifetime of this process, initially NULL)
* @param name name assigned by the user for this ego,
* NULL if the user just deleted the ego and it
{
const char *args0 = cls;
- if (NULL == ego)
+ if (NULL == ego)
{
identity_continuation (args0);
return;
GNUNET_GETOPT_OPTION_END
};
bo.expiration_time =
- GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2);
+ GNUNET_TIME_year_to_time (GNUNET_TIME_get_current_year () + 2);
if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
return 2;