* @author Christian Grothoff
*
* TODO:
- * - printing records
* - allow users to set record options (not just 'RF_AUTHORITY')
* - test
* - parsing SOA, PTR and MX value specifications (and define format!)
* Desired expiration time.
*/
static char *expirationstring;
-
+
/**
* Task run on shutdown. Cleans up everything.
fprintf (stderr, _("Unsupported type `%s'\n"), typestring);
GNUNET_SCHEDULER_shutdown ();
return;
- } else if (add | del)
+ }
+ if ((NULL == typestring) && (add | del))
{
fprintf (stderr,
_("Missing option `%s' for operation `%s'\n"),
rd.record_type = type;
rd.expiration = GNUNET_TIME_relative_to_absolute (etime);
rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always...
- del_qe = GNUNET_NAMESTORE_record_create (ns,
+ del_qe = GNUNET_NAMESTORE_record_remove (ns,
zone_pkey,
name,
&rd,
static const struct GNUNET_GETOPT_CommandLineOption options[] = {
{'a', "add", NULL,
gettext_noop ("add record"), 0,
- &GNUNET_GETOPT_set_one, &add},
+ &GNUNET_GETOPT_set_one, &add},
{'d', "delete", NULL,
gettext_noop ("delete record"), 0,
&GNUNET_GETOPT_set_one, &del},
gettext_noop ("display records"), 0,
&GNUNET_GETOPT_set_one, &list},
{'e', "expiration", "TIME",
- gettext_noop ("expiration time to use (for adding only)"), 1,
+ gettext_noop ("expiration time for record to use (for adding only)"), 1,
&GNUNET_GETOPT_set_string, &expirationstring},
{'n', "name", "NAME",
gettext_noop ("name of the record to add/delete/display"), 1,