gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 18/75: add -z option to gnunet-namestore-fcfsd


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 18/75: add -z option to gnunet-namestore-fcfsd
Date: Thu, 09 Aug 2018 23:58:15 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit b29bd047910a3f0c526b99de2dd1da24c7f0a224
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Jun 7 16:36:50 2018 +0200

    add -z option to gnunet-namestore-fcfsd
---
 doc/man/gnunet-namestore-fcfsd.1       | 19 ++++++++++---------
 src/namestore/gnunet-namestore-fcfsd.c | 28 +++++++++++++++++++++-------
 2 files changed, 31 insertions(+), 16 deletions(-)

diff --git a/doc/man/gnunet-namestore-fcfsd.1 b/doc/man/gnunet-namestore-fcfsd.1
index 6b13c3db4..7fc4093c2 100644
--- a/doc/man/gnunet-namestore-fcfsd.1
+++ b/doc/man/gnunet-namestore-fcfsd.1
@@ -17,19 +17,18 @@ names to be mapped to their GNS zone.  Names are made 
available on a
 First Come First Served basis (hence fcfs).  Registered names do not
 expire.  The HTTP server is run on the port that is specified in the
 configuration file in section "[fcfsd]" under the name "HTTPPORT".
-The key of the zone in which the names are registered must be
-specified under the name "ZONEKEY" in the same section.  It is
-possible to manage gnunet\-gns\-fcfsd using gnunet\-(service\-arm) by
-starting the daemon using "gnunet\-arm \-i fcfsd" or by setting
-"FORCESTART=YES" in the "fcfds" section of your configuration.
+
+It is possible to manage gnunet\-gns\-fcfsd using
+gnunet\-(service\-arm) by starting the daemon using "gnunet\-arm \-i
+fcfsd" or by setting "FORCESTART=YES" in the "fcfds" section of your
+configuration and the "-z ZONE" in as the "OPTION".
 
 An FCFS\-zone is run at http://gnunet.org/fcfs/.  GNS users are
 encouraged to register their zone with the gnunet.org FCFS authority.
 
 If you want to run your own FCFS registrar, you need to first create a
-pseudonym (using "gnunet\-identity \-C NAME"), and then assign it to
-be used for the "fcfsd" service using "gnunet\-identity \-e NAME \-s
-fcfsd".  After that, you can start the FCFSD service (possibly using
+pseudonym (using "gnunet\-identity \-C NAME"), and use it with the
+"-z" option.  After that, you can start the FCFSD service (possibly using
 gnunet\-arm).
 
 .SH OPTIONS
@@ -46,7 +45,9 @@ ERROR.
 .B
 .IP "\-v, \-\-version"
 Print GNUnet version number.
-
+.B
+.IP "\-z EGO, \-\-zone=EGO"
+Specifies for which EGO should FCFSD manage the zone.
 
 .SH BUGS
 Report bugs by using Mantis <https://gnunet.org/bugs/> or by sending 
electronic mail to <address@hidden>
diff --git a/src/namestore/gnunet-namestore-fcfsd.c 
b/src/namestore/gnunet-namestore-fcfsd.c
index 0698e6d72..e0c04e6f1 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -216,6 +216,11 @@ static struct GNUNET_IDENTITY_Operation *id_op;
  */
 static unsigned long long port;
 
+/**
+ * Name of the zone we manage.
+ */
+static char *zone;
+
 
 /**
  * Task run whenever HTTP server operations are pending.
@@ -629,14 +634,14 @@ lookup_block_error (void *cls)
  * and continue to process the result.
  *
  * @param cls the 'struct Request' we are processing
- * @param zone private key of the zone; NULL on disconnect
+ * @param zonekey private key of the zone; NULL on disconnect
  * @param label label of the records; NULL on disconnect
  * @param rd_count number of entries in @a rd array, 0 if label was deleted
  * @param rd array of records with data to store
  */
 static void
 lookup_block_processor (void *cls,
-                        const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
+                        const struct GNUNET_CRYPTO_EcdsaPrivateKey *zonekey,
                         const char *label,
                         unsigned int rd_count,
                         const struct GNUNET_GNSRECORD_Data *rd)
@@ -645,7 +650,7 @@ lookup_block_processor (void *cls,
 
   (void) label;
   (void) rd;
-  (void) zone;
+  (void) zonekey;
   request->qe = NULL;
   if (0 == rd_count)
   {
@@ -1087,9 +1092,12 @@ run (void *cls,
                 _("Failed to connect to identity\n"));
     return;
   }
-  id_op = GNUNET_IDENTITY_get (identity, "fcfsd",
-                              &identity_cb, NULL);
-  GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
+  id_op = GNUNET_IDENTITY_get (identity,
+                              zone,
+                              &identity_cb,
+                              NULL);
+  GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
+                                NULL);
 }
 
 
@@ -1104,7 +1112,13 @@ int
 main (int argc,
       char *const *argv)
 {
-  static const struct GNUNET_GETOPT_CommandLineOption options[] = {
+  struct GNUNET_GETOPT_CommandLineOption options[] = {
+    GNUNET_GETOPT_option_mandatory 
+    (GNUNET_GETOPT_option_string ('z',
+                                 "zone",
+                                 "EGO",
+                                 gettext_noop ("name of the zone that is to be 
managed by FCFSD"),
+                                 &zone)),
     GNUNET_GETOPT_OPTION_END
   };
   int ret;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]