-allow deletion without specifying expiration
authorChristian Grothoff <christian@grothoff.org>
Wed, 21 Mar 2012 16:12:46 +0000 (16:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 21 Mar 2012 16:12:46 +0000 (16:12 +0000)
src/namestore/gnunet-namestore.c
src/namestore/gnunet-service-namestore.c

index eb77913cc50a1f4c953427b4282f88ace6bad637..67464467613e49267ac3a8e4caa391647e1620e3 100644 (file)
@@ -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,
index 3852a1406c4482e3303a9b22caf567eca0c2e0f0..5647dd3115079ad1b83215b981267a062e4039a5 100644 (file)
@@ -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);