aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-namestore.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-07 14:17:19 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-07 14:17:19 +0000
commit3363469a42ac6f4b1245c0fe160a98f40845b748 (patch)
treec43185dbe16e7e4db20faa7460aff00ebd00511b /src/namestore/gnunet-namestore.c
parent473952f8fbdab181512a9df1835758fc54876464 (diff)
downloadgnunet-3363469a42ac6f4b1245c0fe160a98f40845b748.tar.gz
gnunet-3363469a42ac6f4b1245c0fe160a98f40845b748.zip
- reverting api change
Diffstat (limited to 'src/namestore/gnunet-namestore.c')
-rw-r--r--src/namestore/gnunet-namestore.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 9829eaaa4..4f7dc161b 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -104,10 +104,6 @@ static char *typestring;
104 */ 104 */
105static char *expirationstring; 105static char *expirationstring;
106 106
107/**
108 * Desired block expiration time.
109 */
110static char *blockexpirationstring;
111 107
112/** 108/**
113 * Task run on shutdown. Cleans up everything. 109 * Task run on shutdown. Cleans up everything.
@@ -261,7 +257,6 @@ run (void *cls, char *const *args, const char *cfgfile,
261 void *data = NULL; 257 void *data = NULL;
262 size_t data_size = 0; 258 size_t data_size = 0;
263 struct GNUNET_TIME_Relative etime; 259 struct GNUNET_TIME_Relative etime;
264 struct GNUNET_TIME_Relative btime;
265 struct GNUNET_NAMESTORE_RecordData rd; 260 struct GNUNET_NAMESTORE_RecordData rd;
266 261
267 if (NULL == keyfile) 262 if (NULL == keyfile)
@@ -359,27 +354,6 @@ run (void *cls, char *const *args, const char *cfgfile,
359 GNUNET_SCHEDULER_shutdown (); 354 GNUNET_SCHEDULER_shutdown ();
360 return; 355 return;
361 } 356 }
362 if (NULL != blockexpirationstring)
363 {
364 if (GNUNET_OK !=
365 GNUNET_STRINGS_fancy_time_to_relative (blockexpirationstring,
366 &btime))
367 {
368 fprintf (stderr,
369 _("Invalid time format `%s'\n"),
370 blockexpirationstring);
371 GNUNET_SCHEDULER_shutdown ();
372 return;
373 }
374 } else if (add | del)
375 {
376 fprintf (stderr,
377 _("Missing option `%s' for operation `%s'\n"),
378 "-b", _("add/del"));
379 GNUNET_SCHEDULER_shutdown ();
380 return;
381 }
382
383 if (add) 357 if (add)
384 { 358 {
385 if (NULL == name) 359 if (NULL == name)
@@ -397,7 +371,6 @@ run (void *cls, char *const *args, const char *cfgfile,
397 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always... 371 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always...
398 add_qe = GNUNET_NAMESTORE_record_create (ns, 372 add_qe = GNUNET_NAMESTORE_record_create (ns,
399 zone_pkey, 373 zone_pkey,
400 GNUNET_TIME_relative_to_absolute (btime),
401 name, 374 name,
402 &rd, 375 &rd,
403 &add_continuation, 376 &add_continuation,
@@ -451,9 +424,6 @@ main (int argc, char *const *argv)
451 {'a', "add", NULL, 424 {'a', "add", NULL,
452 gettext_noop ("add record"), 0, 425 gettext_noop ("add record"), 0,
453 &GNUNET_GETOPT_set_one, &add}, 426 &GNUNET_GETOPT_set_one, &add},
454 {'b', "name-expiration", "TIME",
455 gettext_noop ("expiration time for name to use (for adding only)"), 1,
456 &GNUNET_GETOPT_set_string, &blockexpirationstring},
457 {'d', "delete", NULL, 427 {'d', "delete", NULL,
458 gettext_noop ("delete record"), 0, 428 gettext_noop ("delete record"), 0,
459 &GNUNET_GETOPT_set_one, &del}, 429 &GNUNET_GETOPT_set_one, &del},