aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fs/gnunet-publish.c57
-rw-r--r--src/util/scheduler.c12
2 files changed, 30 insertions, 39 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index 395aad7db..c75469a24 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -895,35 +895,30 @@ main (int argc, char *const *argv)
895{ 895{
896 struct GNUNET_GETOPT_CommandLineOption options[] = { 896 struct GNUNET_GETOPT_CommandLineOption options[] = {
897 GNUNET_GETOPT_option_uint ('a', 897 GNUNET_GETOPT_option_uint ('a',
898 "anonymity", 898 "anonymity",
899 "LEVEL", 899 "LEVEL",
900 gettext_noop ("set the desired LEVEL of sender-anonymity"), 900 gettext_noop ("set the desired LEVEL of sender-anonymity"),
901 &bo.anonymity_level), 901 &bo.anonymity_level),
902
903 GNUNET_GETOPT_option_flag ('d', 902 GNUNET_GETOPT_option_flag ('d',
904 "disable-creation-time", 903 "disable-creation-time",
905 gettext_noop ("disable adding the creation time to the " 904 gettext_noop ("disable adding the creation time to the "
906 "metadata of the uploaded file"), 905 "metadata of the uploaded file"),
907 &do_disable_creation_time), 906 &do_disable_creation_time),
908
909 GNUNET_GETOPT_option_flag ('D', 907 GNUNET_GETOPT_option_flag ('D',
910 "disable-extractor", 908 "disable-extractor",
911 gettext_noop ("do not use libextractor to add keywords or metadata"), 909 gettext_noop ("do not use libextractor to add keywords or metadata"),
912 &disable_extractor), 910 &disable_extractor),
913
914 GNUNET_GETOPT_option_flag ('e', 911 GNUNET_GETOPT_option_flag ('e',
915 "extract", 912 "extract",
916 gettext_noop ("print list of extracted keywords that would " 913 gettext_noop ("print list of extracted keywords that would "
917 "be used, but do not perform upload"), 914 "be used, but do not perform upload"),
918 &extract_only), 915 &extract_only),
919
920 GNUNET_FS_GETOPT_KEYWORDS ('k', 916 GNUNET_FS_GETOPT_KEYWORDS ('k',
921 "key", 917 "key",
922 "KEYWORD", 918 "KEYWORD",
923 gettext_noop ("add an additional keyword for the top-level " 919 gettext_noop ("add an additional keyword for the top-level "
924 "file or directory (this option can be specified multiple times)"), 920 "file or directory (this option can be specified multiple times)"),
925 &topKeywords), 921 &topKeywords),
926
927 GNUNET_FS_GETOPT_METADATA ('m', 922 GNUNET_FS_GETOPT_METADATA ('m',
928 "meta", 923 "meta",
929 "TYPE:VALUE", 924 "TYPE:VALUE",
@@ -955,20 +950,16 @@ main (int argc, char *const *argv)
955 gettext_noop ("publish the files under the pseudonym " 950 gettext_noop ("publish the files under the pseudonym "
956 "NAME (place file into namespace)"), 951 "NAME (place file into namespace)"),
957 &pseudonym), 952 &pseudonym),
958
959 GNUNET_GETOPT_option_uint ('r', 953 GNUNET_GETOPT_option_uint ('r',
960 "replication", 954 "replication",
961 "LEVEL", 955 "LEVEL",
962 gettext_noop ("set the desired replication LEVEL"), 956 gettext_noop ("set the desired replication LEVEL"),
963 &bo.replication_level), 957 &bo.replication_level),
964
965
966 GNUNET_GETOPT_option_flag ('s', 958 GNUNET_GETOPT_option_flag ('s',
967 "simulate-only", 959 "simulate-only",
968 gettext_noop ("only simulate the process but do not do " 960 gettext_noop ("only simulate the process but do not do "
969 "any actual publishing (useful to compute URIs)"), 961 "any actual publishing (useful to compute URIs)"),
970 &do_simulate), 962 &do_simulate),
971
972 GNUNET_GETOPT_option_string ('t', 963 GNUNET_GETOPT_option_string ('t',
973 "this", 964 "this",
974 "ID", 965 "ID",
@@ -981,7 +972,7 @@ main (int argc, char *const *argv)
981 "URI", 972 "URI",
982 gettext_noop ("URI to be published (can be used instead of passing a " 973 gettext_noop ("URI to be published (can be used instead of passing a "
983 "file to add keywords to the file with the respective URI)"), 974 "file to add keywords to the file with the respective URI)"),
984 &uri_string), 975 &uri_string),
985 976
986 GNUNET_GETOPT_option_verbose (&verbose), 977 GNUNET_GETOPT_option_verbose (&verbose),
987 978
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index d0e8f7bc6..6cf5e1168 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -679,12 +679,12 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_TaskCallback task,
679 struct DriverContext context = {.scheduled_head = NULL, 679 struct DriverContext context = {.scheduled_head = NULL,
680 .scheduled_tail = NULL, 680 .scheduled_tail = NULL,
681 .timeout = GNUNET_TIME_UNIT_FOREVER_REL}; 681 .timeout = GNUNET_TIME_UNIT_FOREVER_REL};
682 682
683 driver = GNUNET_SCHEDULER_driver_select (); 683 driver = GNUNET_SCHEDULER_driver_select ();
684 driver->cls = &context; 684 driver->cls = &context;
685 685
686 GNUNET_SCHEDULER_run_with_driver (driver, task, task_cls); 686 GNUNET_SCHEDULER_run_with_driver (driver, task, task_cls);
687 687
688 GNUNET_free (driver); 688 GNUNET_free (driver);
689} 689}
690 690
@@ -860,7 +860,7 @@ driver_add_multiple (struct GNUNET_SCHEDULER_Task *t)
860 success = scheduler_driver->add (scheduler_driver->cls, 860 success = scheduler_driver->add (scheduler_driver->cls,
861 t, 861 t,
862 fdi) && success; 862 fdi) && success;
863 fdi->et = GNUNET_SCHEDULER_ET_NONE; 863 fdi->et = GNUNET_SCHEDULER_ET_NONE;
864 } 864 }
865 if (GNUNET_YES != success) 865 if (GNUNET_YES != success)
866 { 866 {
@@ -2232,7 +2232,7 @@ select_loop (void *cls,
2232 struct DriverContext *context; 2232 struct DriverContext *context;
2233 int select_result; 2233 int select_result;
2234 int tasks_ready; 2234 int tasks_ready;
2235 2235
2236 context = cls; 2236 context = cls;
2237 GNUNET_assert (NULL != context); 2237 GNUNET_assert (NULL != context);
2238 rs = GNUNET_NETWORK_fdset_create (); 2238 rs = GNUNET_NETWORK_fdset_create ();
@@ -2338,7 +2338,7 @@ select_loop (void *cls,
2338 } 2338 }
2339 GNUNET_NETWORK_fdset_destroy (rs); 2339 GNUNET_NETWORK_fdset_destroy (rs);
2340 GNUNET_NETWORK_fdset_destroy (ws); 2340 GNUNET_NETWORK_fdset_destroy (ws);
2341 return GNUNET_OK; 2341 return GNUNET_OK;
2342} 2342}
2343 2343
2344 2344
@@ -2348,7 +2348,7 @@ select_set_wakeup (void *cls,
2348{ 2348{
2349 struct DriverContext *context = cls; 2349 struct DriverContext *context = cls;
2350 GNUNET_assert (NULL != context); 2350 GNUNET_assert (NULL != context);
2351 2351
2352 context->timeout = GNUNET_TIME_absolute_get_remaining (dt); 2352 context->timeout = GNUNET_TIME_absolute_get_remaining (dt);
2353} 2353}
2354 2354