aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-13 13:37:49 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-13 13:37:49 +0000
commitdc81a96f34329003205329317429c73900fe2b25 (patch)
tree802dbaba3aee6f925a65333645c513b3c8f3e059
parent2b062d251328178bb63cbbb8109a821cbf308a91 (diff)
downloadgnunet-dc81a96f34329003205329317429c73900fe2b25.tar.gz
gnunet-dc81a96f34329003205329317429c73900fe2b25.zip
-actually, on W32 we do need to convert...
-rw-r--r--src/fs/gnunet-helper-fs-publish.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c
index 9291bd456..add45ede6 100644
--- a/src/fs/gnunet-helper-fs-publish.c
+++ b/src/fs/gnunet-helper-fs-publish.c
@@ -448,6 +448,9 @@ int main(int argc,
448 * binary mode. 448 * binary mode.
449 */ 449 */
450 _setmode (1, _O_BINARY); 450 _setmode (1, _O_BINARY);
451 /* Get utf-8-encoded arguments */
452 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
453 return 5;
451#else 454#else
452 ignore_sigpipe (); 455 ignore_sigpipe ();
453#endif 456#endif
@@ -458,6 +461,9 @@ int main(int argc,
458 FPRINTF (stderr, 461 FPRINTF (stderr,
459 "%s", 462 "%s",
460 "gnunet-helper-fs-publish needs exactly one or two arguments\n"); 463 "gnunet-helper-fs-publish needs exactly one or two arguments\n");
464#if WINDOWS
465 GNUNET_free ((void*) argv);
466#endif
461 return 1; 467 return 1;
462 } 468 }
463 filename_expanded = argv[1]; 469 filename_expanded = argv[1];
@@ -477,6 +483,9 @@ int main(int argc,
477 { 483 {
478 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); 484 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0);
479 EXTRACTOR_plugin_remove_all (plugins); 485 EXTRACTOR_plugin_remove_all (plugins);
486#if WINDOWS
487 GNUNET_free ((void*) argv);
488#endif
480 return 2; 489 return 2;
481 } 490 }
482 /* signal that we're done counting files, so that a percentage of 491 /* signal that we're done counting files, so that a percentage of
@@ -485,6 +494,9 @@ int main(int argc,
485 write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, NULL, 0)) 494 write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, NULL, 0))
486 { 495 {
487 EXTRACTOR_plugin_remove_all (plugins); 496 EXTRACTOR_plugin_remove_all (plugins);
497#if WINDOWS
498 GNUNET_free ((void*) argv);
499#endif
488 return 3; 500 return 3;
489 } 501 }
490 if (NULL != root) 502 if (NULL != root)
@@ -495,6 +507,9 @@ int main(int argc,
495 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); 507 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0);
496 free_tree (root); 508 free_tree (root);
497 EXTRACTOR_plugin_remove_all (plugins); 509 EXTRACTOR_plugin_remove_all (plugins);
510#if WINDOWS
511 GNUNET_free ((void*) argv);
512#endif
498 return 4; 513 return 4;
499 } 514 }
500 free_tree (root); 515 free_tree (root);
@@ -502,6 +517,9 @@ int main(int argc,
502 /* enable "clean" shutdown by telling parent that we are done */ 517 /* enable "clean" shutdown by telling parent that we are done */
503 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 0); 518 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 0);
504 EXTRACTOR_plugin_remove_all (plugins); 519 EXTRACTOR_plugin_remove_all (plugins);
520#if WINDOWS
521 GNUNET_free ((void*) argv);
522#endif
505 return 0; 523 return 0;
506} 524}
507 525