diff options
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r-- | src/fs/gnunet-publish.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index ffcdefdc6..dd3bf6810 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -115,7 +115,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
115 | if (verbose) | 115 | if (verbose) |
116 | { | 116 | { |
117 | s = GNUNET_STRINGS_relative_time_to_string (info->value.publish.eta); | 117 | s = GNUNET_STRINGS_relative_time_to_string (info->value.publish.eta); |
118 | fprintf (stdout, _("Publishing `%s' at %llu/%llu (%s remaining)\n"), | 118 | FPRINTF (stdout, _("Publishing `%s' at %llu/%llu (%s remaining)\n"), |
119 | info->value.publish.filename, | 119 | info->value.publish.filename, |
120 | (unsigned long long) info->value.publish.completed, | 120 | (unsigned long long) info->value.publish.completed, |
121 | (unsigned long long) info->value.publish.size, s); | 121 | (unsigned long long) info->value.publish.size, s); |
@@ -123,7 +123,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
123 | } | 123 | } |
124 | break; | 124 | break; |
125 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 125 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
126 | fprintf (stderr, _("Error publishing: %s.\n"), | 126 | FPRINTF (stderr, _("Error publishing: %s.\n"), |
127 | info->value.publish.specifics.error.message); | 127 | info->value.publish.specifics.error.message); |
128 | if (kill_task != GNUNET_SCHEDULER_NO_TASK) | 128 | if (kill_task != GNUNET_SCHEDULER_NO_TASK) |
129 | { | 129 | { |
@@ -134,11 +134,11 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
134 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 134 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
135 | break; | 135 | break; |
136 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: | 136 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: |
137 | fprintf (stdout, _("Publishing `%s' done.\n"), | 137 | FPRINTF (stdout, _("Publishing `%s' done.\n"), |
138 | info->value.publish.filename); | 138 | info->value.publish.filename); |
139 | s = GNUNET_FS_uri_to_string (info->value.publish.specifics. | 139 | s = GNUNET_FS_uri_to_string (info->value.publish.specifics. |
140 | completed.chk_uri); | 140 | completed.chk_uri); |
141 | fprintf (stdout, _("URI is `%s'.\n"), s); | 141 | FPRINTF (stdout, _("URI is `%s'.\n"), s); |
142 | GNUNET_free (s); | 142 | GNUNET_free (s); |
143 | if (info->value.publish.pctx == NULL) | 143 | if (info->value.publish.pctx == NULL) |
144 | { | 144 | { |
@@ -157,10 +157,10 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
157 | case GNUNET_FS_STATUS_UNINDEX_PROGRESS: | 157 | case GNUNET_FS_STATUS_UNINDEX_PROGRESS: |
158 | return NULL; | 158 | return NULL; |
159 | case GNUNET_FS_STATUS_UNINDEX_COMPLETED: | 159 | case GNUNET_FS_STATUS_UNINDEX_COMPLETED: |
160 | fprintf (stderr, _("Cleanup after abort complete.\n")); | 160 | FPRINTF (stderr, "%s", _("Cleanup after abort complete.\n")); |
161 | return NULL; | 161 | return NULL; |
162 | default: | 162 | default: |
163 | fprintf (stderr, _("Unexpected status: %d\n"), info->status); | 163 | FPRINTF (stderr, _("Unexpected status: %d\n"), info->status); |
164 | return NULL; | 164 | return NULL; |
165 | } | 165 | } |
166 | return ""; /* non-null */ | 166 | return ""; /* non-null */ |
@@ -190,7 +190,7 @@ meta_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, | |||
190 | return 0; | 190 | return 0; |
191 | if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) | 191 | if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) |
192 | return 0; | 192 | return 0; |
193 | fprintf (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data); | 193 | FPRINTF (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data); |
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |
196 | 196 | ||
@@ -206,7 +206,7 @@ meta_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, | |||
206 | static int | 206 | static int |
207 | keyword_printer (void *cls, const char *keyword, int is_mandatory) | 207 | keyword_printer (void *cls, const char *keyword, int is_mandatory) |
208 | { | 208 | { |
209 | fprintf (stdout, "\t%s\n", keyword); | 209 | FPRINTF (stdout, "\t%s\n", keyword); |
210 | return GNUNET_OK; | 210 | return GNUNET_OK; |
211 | } | 211 | } |
212 | 212 | ||
@@ -269,14 +269,14 @@ publish_inspector (void *cls, struct GNUNET_FS_FileInformation *fi, | |||
269 | fn = GNUNET_CONTAINER_meta_data_get_by_type (m, | 269 | fn = GNUNET_CONTAINER_meta_data_get_by_type (m, |
270 | EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME); | 270 | EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME); |
271 | fs = GNUNET_STRINGS_byte_size_fancy (length); | 271 | fs = GNUNET_STRINGS_byte_size_fancy (length); |
272 | fprintf (stdout, _("Meta data for file `%s' (%s)\n"), fn, fs); | 272 | FPRINTF (stdout, _("Meta data for file `%s' (%s)\n"), fn, fs); |
273 | GNUNET_CONTAINER_meta_data_iterate (m, &meta_printer, NULL); | 273 | GNUNET_CONTAINER_meta_data_iterate (m, &meta_printer, NULL); |
274 | fprintf (stdout, _("Keywords for file `%s' (%s)\n"), fn, fs); | 274 | FPRINTF (stdout, _("Keywords for file `%s' (%s)\n"), fn, fs); |
275 | GNUNET_free (fn); | 275 | GNUNET_free (fn); |
276 | GNUNET_free (fs); | 276 | GNUNET_free (fs); |
277 | if (NULL != *uri) | 277 | if (NULL != *uri) |
278 | GNUNET_FS_uri_ksk_get_keywords (*uri, &keyword_printer, NULL); | 278 | GNUNET_FS_uri_ksk_get_keywords (*uri, &keyword_printer, NULL); |
279 | fprintf (stdout, "\n"); | 279 | FPRINTF (stdout, "%s", "\n"); |
280 | } | 280 | } |
281 | if (GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (m)) | 281 | if (GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (m)) |
282 | GNUNET_FS_file_information_inspect (fi, &publish_inspector, fi); | 282 | GNUNET_FS_file_information_inspect (fi, &publish_inspector, fi); |
@@ -293,7 +293,7 @@ uri_sks_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, | |||
293 | { | 293 | { |
294 | if (emsg != NULL) | 294 | if (emsg != NULL) |
295 | { | 295 | { |
296 | fprintf (stderr, "%s\n", emsg); | 296 | FPRINTF (stderr, "%s\n", emsg); |
297 | ret = 1; | 297 | ret = 1; |
298 | } | 298 | } |
299 | GNUNET_FS_uri_destroy (uri); | 299 | GNUNET_FS_uri_destroy (uri); |
@@ -314,7 +314,7 @@ uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, | |||
314 | 314 | ||
315 | if (emsg != NULL) | 315 | if (emsg != NULL) |
316 | { | 316 | { |
317 | fprintf (stderr, "%s\n", emsg); | 317 | FPRINTF (stderr, "%s\n", emsg); |
318 | ret = 1; | 318 | ret = 1; |
319 | } | 319 | } |
320 | if (pseudonym != NULL) | 320 | if (pseudonym != NULL) |
@@ -322,7 +322,7 @@ uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, | |||
322 | ns = GNUNET_FS_namespace_create (ctx, pseudonym); | 322 | ns = GNUNET_FS_namespace_create (ctx, pseudonym); |
323 | if (ns == NULL) | 323 | if (ns == NULL) |
324 | { | 324 | { |
325 | fprintf (stderr, _("Failed to create namespace `%s'\n"), pseudonym); | 325 | FPRINTF (stderr, _("Failed to create namespace `%s'\n"), pseudonym); |
326 | ret = 1; | 326 | ret = 1; |
327 | } | 327 | } |
328 | else | 328 | else |
@@ -385,7 +385,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
385 | { | 385 | { |
386 | if (NULL == this_id) | 386 | if (NULL == this_id) |
387 | { | 387 | { |
388 | fprintf (stderr, _("Option `%s' is required when using option `%s'.\n"), | 388 | FPRINTF (stderr, _("Option `%s' is required when using option `%s'.\n"), |
389 | "-t", "-P"); | 389 | "-t", "-P"); |
390 | ret = -1; | 390 | ret = -1; |
391 | return; | 391 | return; |
@@ -395,14 +395,14 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
395 | { /* ordinary insertion checks */ | 395 | { /* ordinary insertion checks */ |
396 | if (NULL != next_id) | 396 | if (NULL != next_id) |
397 | { | 397 | { |
398 | fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"), | 398 | FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"), |
399 | "-N", "-P"); | 399 | "-N", "-P"); |
400 | ret = -1; | 400 | ret = -1; |
401 | return; | 401 | return; |
402 | } | 402 | } |
403 | if (NULL != this_id) | 403 | if (NULL != this_id) |
404 | { | 404 | { |
405 | fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"), | 405 | FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"), |
406 | "-t", "-P"); | 406 | "-t", "-P"); |
407 | ret = -1; | 407 | ret = -1; |
408 | return; | 408 | return; |
@@ -414,7 +414,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
414 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); | 414 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); |
415 | if (NULL == ctx) | 415 | if (NULL == ctx) |
416 | { | 416 | { |
417 | fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); | 417 | FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); |
418 | ret = 1; | 418 | ret = 1; |
419 | return; | 419 | return; |
420 | } | 420 | } |
@@ -424,7 +424,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
424 | namespace = GNUNET_FS_namespace_create (ctx, pseudonym); | 424 | namespace = GNUNET_FS_namespace_create (ctx, pseudonym); |
425 | if (NULL == namespace) | 425 | if (NULL == namespace) |
426 | { | 426 | { |
427 | fprintf (stderr, _("Could not create namespace `%s'\n"), pseudonym); | 427 | FPRINTF (stderr, _("Could not create namespace `%s'\n"), pseudonym); |
428 | GNUNET_FS_stop (ctx); | 428 | GNUNET_FS_stop (ctx); |
429 | ret = 1; | 429 | ret = 1; |
430 | return; | 430 | return; |
@@ -436,7 +436,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
436 | uri = GNUNET_FS_uri_parse (uri_string, &emsg); | 436 | uri = GNUNET_FS_uri_parse (uri_string, &emsg); |
437 | if (uri == NULL) | 437 | if (uri == NULL) |
438 | { | 438 | { |
439 | fprintf (stderr, _("Failed to parse URI: %s\n"), emsg); | 439 | FPRINTF (stderr, _("Failed to parse URI: %s\n"), emsg); |
440 | GNUNET_free (emsg); | 440 | GNUNET_free (emsg); |
441 | if (namespace != NULL) | 441 | if (namespace != NULL) |
442 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); | 442 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); |
@@ -494,7 +494,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
494 | EXTRACTOR_plugin_remove_all (plugins); | 494 | EXTRACTOR_plugin_remove_all (plugins); |
495 | if (fi == NULL) | 495 | if (fi == NULL) |
496 | { | 496 | { |
497 | fprintf (stderr, _("Could not publish `%s': %s\n"), args[0], emsg); | 497 | FPRINTF (stderr, _("Could not publish `%s': %s\n"), args[0], emsg); |
498 | GNUNET_free (emsg); | 498 | GNUNET_free (emsg); |
499 | if (namespace != NULL) | 499 | if (namespace != NULL) |
500 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); | 500 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); |
@@ -517,7 +517,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
517 | GNUNET_FS_PUBLISH_OPTION_NONE); | 517 | GNUNET_FS_PUBLISH_OPTION_NONE); |
518 | if (NULL == pc) | 518 | if (NULL == pc) |
519 | { | 519 | { |
520 | fprintf (stderr, _("Could not start publishing.\n")); | 520 | FPRINTF (stderr, "%s", _("Could not start publishing.\n")); |
521 | GNUNET_FS_stop (ctx); | 521 | GNUNET_FS_stop (ctx); |
522 | ret = 1; | 522 | ret = 1; |
523 | return; | 523 | return; |