-bringing copyright tags up to FSF standard
[oweals/gnunet.git] / src / namestore / gnunet-namestore.c
index f5a13c96b9bda7af7bedf53912c8596c1c2ec7ca..62846df922512320c5d026a2546b7776c7931c7d 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2012, 2013, 2014 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012, 2013, 2014 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -109,11 +109,6 @@ static int is_public;
  */
 static int is_shadow;
 
-/**
- * Is record pending approval (#GNUNET_GNSRECORD_RF_PENDING)
- */
-static int is_pending;
-
 /**
  * Queue entry for the 'del' operation.
  */
@@ -414,13 +409,12 @@ display_record (void *cls,
       ets = GNUNET_STRINGS_absolute_time_to_string (at);
     }
     FPRINTF (stdout,
-            "\t%s: %s (%s)\t%s\t%s\t%s\n",
+            "\t%s: %s (%s)\t%s\t%s\n",
             typestring,
             s,
              ets,
              (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE)) ? "PRIVATE" : "PUBLIC",
-             (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)) ? "SHADOW" : "",
-             (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PENDING)) ? "PENDING" : "");
+             (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)) ? "SHADOW" : "");
     GNUNET_free (s);
   }
   FPRINTF (stdout, "%s", "\n");
@@ -493,6 +487,7 @@ get_existing_record (void *cls,
                rec_name);
       ret = 1;
       test_finished ();
+      return;
     case GNUNET_GNSRECORD_TYPE_GNS2DNS:
       fprintf (stderr,
                _("A %s record exists already under `%s', no other records can be added.\n"),
@@ -552,8 +547,6 @@ get_existing_record (void *cls,
     rde->flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
   if (1 != is_public)
     rde->flags |= GNUNET_GNSRECORD_RF_PRIVATE;
-  if (1 == is_pending)
-    rde->flags |= GNUNET_GNSRECORD_RF_PENDING;
   if (GNUNET_YES == etime_is_rel)
   {
     rde->expiration_time = etime_rel.rel_value_us;
@@ -864,7 +857,11 @@ testservice_task (void *cls,
     char sname[64];
     struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
 
-    if ( (2 != (sscanf (uri, "gnunet://gns/%52s/%63s", sh, sname)) ) ||
+    GNUNET_STRINGS_utf8_tolower (uri, uri);
+    if ( (2 != (sscanf (uri,
+                        "gnunet://gns/%52s/%63s",
+                        sh,
+                        sname)) ) ||
          (GNUNET_OK != GNUNET_CRYPTO_ecdsa_public_key_from_string (sh, strlen (sh), &pkey)) )
     {
       fprintf (stderr,
@@ -1062,7 +1059,6 @@ int
 main (int argc, char *const *argv)
 {
   is_public = -1;
-  is_pending = -1;
   is_shadow = -1;
 
   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -1102,9 +1098,6 @@ main (int argc, char *const *argv)
     {'p', "public", NULL,
      gettext_noop ("create or list public record"), 0,
      &GNUNET_GETOPT_set_one, &is_public},
-    {'P', "pending", NULL,
-     gettext_noop ("create record that is pending approval (and thus for now inactive)"), 0,
-     &GNUNET_GETOPT_set_one, &is_pending},
     {'s', "shadow", NULL,
      gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), 0,
      &GNUNET_GETOPT_set_one, &is_shadow},