aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-namestore.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-27 14:07:35 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-27 14:07:35 +0000
commit88d558ec7a91a199fcbf467b69ff3a9428e3fe9a (patch)
treeaf79534e41731ea3a20acd28e5903811f9ca49bb /src/namestore/gnunet-namestore.c
parent702a86183ffb2a42a23cb12b13835ad4e4e58f54 (diff)
downloadgnunet-88d558ec7a91a199fcbf467b69ff3a9428e3fe9a.tar.gz
gnunet-88d558ec7a91a199fcbf467b69ff3a9428e3fe9a.zip
- added "never for expiration"
Diffstat (limited to 'src/namestore/gnunet-namestore.c')
-rw-r--r--src/namestore/gnunet-namestore.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 1eec9cfdc..6bde4d90e 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -25,7 +25,6 @@
25 * TODO: 25 * TODO:
26 * - allow users to set record options (not just 'RF_AUTHORITY') 26 * - allow users to set record options (not just 'RF_AUTHORITY')
27 * - test 27 * - test
28 * - parsing SOA, PTR and MX value specifications (and define format!)
29 * - add options to list/lookup individual records 28 * - add options to list/lookup individual records
30 */ 29 */
31#include "platform.h" 30#include "platform.h"
@@ -355,7 +354,11 @@ run (void *cls, char *const *args, const char *cfgfile,
355 } 354 }
356 if (NULL != expirationstring) 355 if (NULL != expirationstring)
357 { 356 {
358 if (GNUNET_OK != 357 if (0 == strcmp (expirationstring, "never"))
358 {
359 etime = GNUNET_TIME_relative_get_forever();
360 }
361 else if (GNUNET_OK !=
359 GNUNET_STRINGS_fancy_time_to_relative (expirationstring, 362 GNUNET_STRINGS_fancy_time_to_relative (expirationstring,
360 &etime)) 363 &etime))
361 { 364 {
@@ -465,7 +468,7 @@ main (int argc, char *const *argv)
465 gettext_noop ("display records"), 0, 468 gettext_noop ("display records"), 0,
466 &GNUNET_GETOPT_set_one, &list}, 469 &GNUNET_GETOPT_set_one, &list},
467 {'e', "expiration", "TIME", 470 {'e', "expiration", "TIME",
468 gettext_noop ("expiration time for record to use (for adding only)"), 1, 471 gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), 1,
469 &GNUNET_GETOPT_set_string, &expirationstring}, 472 &GNUNET_GETOPT_set_string, &expirationstring},
470 {'n', "name", "NAME", 473 {'n', "name", "NAME",
471 gettext_noop ("name of the record to add/delete/display"), 1, 474 gettext_noop ("name of the record to add/delete/display"), 1,