diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-08-13 08:12:33 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-08-13 08:12:33 +0000 |
commit | 8e2f63c53202198ba8499393041c83bbd93ea6f7 (patch) | |
tree | ced619b7b3b9f07444be878ab895de92e2d87db0 /src/gns | |
parent | f848e33cb8088e9a3e66f9cc3df7175e67a1b396 (diff) | |
download | gnunet-8e2f63c53202198ba8499393041c83bbd93ea6f7.tar.gz gnunet-8e2f63c53202198ba8499393041c83bbd93ea6f7.zip |
-fix gns cli hang, fix help
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gnunet-gns.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index b528c71f4..c7cc12978 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c | |||
@@ -22,8 +22,6 @@ | |||
22 | * @brief command line tool to access distributed GNS | 22 | * @brief command line tool to access distributed GNS |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * | 24 | * |
25 | * TODO: | ||
26 | * - everything | ||
27 | */ | 25 | */ |
28 | #include "platform.h" | 26 | #include "platform.h" |
29 | #include <gnunet_util_lib.h> | 27 | #include <gnunet_util_lib.h> |
@@ -329,6 +327,16 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
329 | if (NULL != private_zone) | 327 | if (NULL != private_zone) |
330 | GNUNET_free (private_zone); | 328 | GNUNET_free (private_zone); |
331 | 329 | ||
330 | if ((NULL == auth_name) && | ||
331 | (NULL == shorten_name) && | ||
332 | (NULL == lookup_name)) | ||
333 | { | ||
334 | if (!raw) | ||
335 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
336 | "Please specify lookup, shorten or authority operation!\n"); | ||
337 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | ||
338 | } | ||
339 | |||
332 | shutdown_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 340 | shutdown_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
333 | &do_shutdown, NULL); | 341 | &do_shutdown, NULL); |
334 | } | 342 | } |
@@ -346,16 +354,16 @@ main (int argc, char *const *argv) | |||
346 | { | 354 | { |
347 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 355 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { |
348 | {'s', "shorten", NULL, | 356 | {'s', "shorten", NULL, |
349 | gettext_noop ("try to shorten a given GNS name"), 1, | 357 | gettext_noop ("try to shorten a given name"), 1, |
350 | &GNUNET_GETOPT_set_string, &shorten_name}, | 358 | &GNUNET_GETOPT_set_string, &shorten_name}, |
351 | {'u', "lookup", NULL, | 359 | {'u', "lookup", NULL, |
352 | gettext_noop ("Lookup a record using GNS (NOT IMPLEMENTED)"), 1, | 360 | gettext_noop ("Lookup a record for the given name"), 1, |
353 | &GNUNET_GETOPT_set_string, &lookup_name}, | 361 | &GNUNET_GETOPT_set_string, &lookup_name}, |
354 | {'a', "authority", NULL, | 362 | {'a', "authority", NULL, |
355 | gettext_noop ("Get the authority of a particular name"), 1, | 363 | gettext_noop ("Get the authority of a particular name"), 1, |
356 | &GNUNET_GETOPT_set_string, &auth_name}, | 364 | &GNUNET_GETOPT_set_string, &auth_name}, |
357 | {'t', "type", NULL, | 365 | {'t', "type", NULL, |
358 | gettext_noop ("Specify the type of the record lookup"), 1, | 366 | gettext_noop ("Specify the type of the record to lookup"), 1, |
359 | &GNUNET_GETOPT_set_string, &lookup_type}, | 367 | &GNUNET_GETOPT_set_string, &lookup_type}, |
360 | {'r', "raw", NULL, | 368 | {'r', "raw", NULL, |
361 | gettext_noop ("No unneeded output"), 0, | 369 | gettext_noop ("No unneeded output"), 0, |