diff options
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r-- | src/fs/gnunet-publish.c | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 999301c2f..ffcf9b5d0 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -496,21 +496,22 @@ uri_ksk_continuation (void *cls, | |||
496 | emsg); | 496 | emsg); |
497 | ret = 1; | 497 | ret = 1; |
498 | } | 498 | } |
499 | if (NULL != namespace) | 499 | if (NULL == namespace) |
500 | { | 500 | { |
501 | priv = GNUNET_IDENTITY_ego_get_private_key (namespace); | 501 | GNUNET_SCHEDULER_shutdown (); |
502 | GNUNET_FS_publish_sks (ctx, | ||
503 | priv, | ||
504 | this_id, | ||
505 | next_id, | ||
506 | meta, | ||
507 | uri, | ||
508 | &bo, | ||
509 | GNUNET_FS_PUBLISH_OPTION_NONE, | ||
510 | &uri_sks_continuation, NULL); | ||
511 | return; | 502 | return; |
512 | } | 503 | } |
513 | GNUNET_SCHEDULER_shutdown (); | 504 | priv = GNUNET_IDENTITY_ego_get_private_key (namespace); |
505 | GNUNET_FS_publish_sks (ctx, | ||
506 | priv, | ||
507 | this_id, | ||
508 | next_id, | ||
509 | meta, | ||
510 | uri, | ||
511 | &bo, | ||
512 | GNUNET_FS_PUBLISH_OPTION_NONE, | ||
513 | &uri_sks_continuation, | ||
514 | NULL); | ||
514 | } | 515 | } |
515 | 516 | ||
516 | 517 | ||
@@ -728,7 +729,8 @@ identity_continuation (const char *args0) | |||
728 | GNUNET_SCHEDULER_shutdown (); | 729 | GNUNET_SCHEDULER_shutdown (); |
729 | return; | 730 | return; |
730 | } | 731 | } |
731 | GNUNET_FS_publish_ksk (ctx, topKeywords, | 732 | GNUNET_FS_publish_ksk (ctx, |
733 | topKeywords, | ||
732 | meta, uri, | 734 | meta, uri, |
733 | &bo, | 735 | &bo, |
734 | GNUNET_FS_PUBLISH_OPTION_NONE, | 736 | GNUNET_FS_PUBLISH_OPTION_NONE, |
@@ -889,7 +891,8 @@ run (void *cls, | |||
889 | * @return 0 ok, 1 on error | 891 | * @return 0 ok, 1 on error |
890 | */ | 892 | */ |
891 | int | 893 | int |
892 | main (int argc, char *const *argv) | 894 | main (int argc, |
895 | char *const *argv) | ||
893 | { | 896 | { |
894 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 897 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
895 | GNUNET_GETOPT_option_uint ('a', | 898 | GNUNET_GETOPT_option_uint ('a', |
@@ -922,26 +925,22 @@ main (int argc, char *const *argv) | |||
922 | "TYPE:VALUE", | 925 | "TYPE:VALUE", |
923 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), | 926 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), |
924 | &meta), | 927 | &meta), |
925 | |||
926 | GNUNET_GETOPT_option_flag ('n', | 928 | GNUNET_GETOPT_option_flag ('n', |
927 | "noindex", | 929 | "noindex", |
928 | gettext_noop ("do not index, perform full insertion (stores " | 930 | gettext_noop ("do not index, perform full insertion (stores " |
929 | "entire file in encrypted form in GNUnet database)"), | 931 | "entire file in encrypted form in GNUnet database)"), |
930 | &do_insert), | 932 | &do_insert), |
931 | |||
932 | GNUNET_GETOPT_option_string ('N', | 933 | GNUNET_GETOPT_option_string ('N', |
933 | "next", | 934 | "next", |
934 | "ID", | 935 | "ID", |
935 | gettext_noop ("specify ID of an updated version to be " | 936 | gettext_noop ("specify ID of an updated version to be " |
936 | "published in the future (for namespace insertions only)"), | 937 | "published in the future (for namespace insertions only)"), |
937 | &next_id), | 938 | &next_id), |
938 | |||
939 | GNUNET_GETOPT_option_uint ('p', | 939 | GNUNET_GETOPT_option_uint ('p', |
940 | "priority", | 940 | "priority", |
941 | "PRIORITY", | 941 | "PRIORITY", |
942 | gettext_noop ("specify the priority of the content"), | 942 | gettext_noop ("specify the priority of the content"), |
943 | &bo.content_priority), | 943 | &bo.content_priority), |
944 | |||
945 | GNUNET_GETOPT_option_string ('P', | 944 | GNUNET_GETOPT_option_string ('P', |
946 | "pseudonym", | 945 | "pseudonym", |
947 | "NAME", | 946 | "NAME", |
@@ -964,7 +963,6 @@ main (int argc, char *const *argv) | |||
964 | gettext_noop ("set the ID of this version of the publication " | 963 | gettext_noop ("set the ID of this version of the publication " |
965 | "(for namespace insertions only)"), | 964 | "(for namespace insertions only)"), |
966 | &this_id), | 965 | &this_id), |
967 | |||
968 | GNUNET_GETOPT_option_string ('u', | 966 | GNUNET_GETOPT_option_string ('u', |
969 | "uri", | 967 | "uri", |
970 | "URI", | 968 | "URI", |
@@ -982,10 +980,14 @@ main (int argc, char *const *argv) | |||
982 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 980 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
983 | return 2; | 981 | return 2; |
984 | ret = (GNUNET_OK == | 982 | ret = (GNUNET_OK == |
985 | GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME", | 983 | GNUNET_PROGRAM_run (argc, |
984 | argv, | ||
985 | "gnunet-publish [OPTIONS] FILENAME", | ||
986 | gettext_noop | 986 | gettext_noop |
987 | ("Publish a file or directory on GNUnet"), | 987 | ("Publish a file or directory on GNUnet"), |
988 | options, &run, NULL)) ? ret : 1; | 988 | options, |
989 | &run, | ||
990 | NULL)) ? ret : 1; | ||
989 | GNUNET_free ((void*) argv); | 991 | GNUNET_free ((void*) argv); |
990 | return ret; | 992 | return ret; |
991 | } | 993 | } |