From: Christian Grothoff Date: Wed, 21 Mar 2012 16:12:46 +0000 (+0000) Subject: -allow deletion without specifying expiration X-Git-Tag: initial-import-from-subversion-38251~14162 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b99555d0cf6abbf74b4adab736658ed44ea2f3bd;p=oweals%2Fgnunet.git -allow deletion without specifying expiration --- diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index eb77913cc..674644676 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c @@ -355,11 +355,11 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_SCHEDULER_shutdown (); return; } - } else if (add | del) + } else if (add) { fprintf (stderr, _("Missing option `%s' for operation `%s'\n"), - "-e", _("add/del")); + "-e", _("add")); GNUNET_SCHEDULER_shutdown (); return; } @@ -377,7 +377,7 @@ run (void *cls, char *const *args, const char *cfgfile, rd.data_size = data_size; rd.record_type = type; rd.expiration = GNUNET_TIME_relative_to_absolute (etime); - rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always... + rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; add_qe = GNUNET_NAMESTORE_record_create (ns, zone_pkey, name, @@ -398,8 +398,8 @@ run (void *cls, char *const *args, const char *cfgfile, rd.data = data; rd.data_size = data_size; rd.record_type = type; - rd.expiration = GNUNET_TIME_relative_to_absolute (etime); - rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; // FIXME: not always... + rd.expiration.abs_value = 0; + rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY; del_qe = GNUNET_NAMESTORE_record_remove (ns, zone_pkey, name, diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 3852a1406..5647dd311 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -1016,8 +1016,6 @@ handle_record_remove_it (void *cls, found = GNUNET_SYSERR; for (c = 0; c < rd_count; c++) { - if (rd[c].expiration.abs_value != rrc->rd->expiration.abs_value) - continue; GNUNET_break(0); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SENT FLAGES: %u \n",rd[c].flags); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "STORED FLAGES: %u \n",rrc->rd->flags);