aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-07 16:36:50 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-07 16:36:50 +0200
commitb29bd047910a3f0c526b99de2dd1da24c7f0a224 (patch)
tree37b4eae1f7e83367d7bc01bc4b1f54cf3a2d19d1 /src
parent3ec6a0f2b110771d09f407b47c3d56b2bcf12848 (diff)
downloadgnunet-b29bd047910a3f0c526b99de2dd1da24c7f0a224.tar.gz
gnunet-b29bd047910a3f0c526b99de2dd1da24c7f0a224.zip
add -z option to gnunet-namestore-fcfsd
Diffstat (limited to 'src')
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c28
1 files changed, 21 insertions, 7 deletions
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;
216 */ 216 */
217static unsigned long long port; 217static unsigned long long port;
218 218
219/**
220 * Name of the zone we manage.
221 */
222static char *zone;
223
219 224
220/** 225/**
221 * Task run whenever HTTP server operations are pending. 226 * Task run whenever HTTP server operations are pending.
@@ -629,14 +634,14 @@ lookup_block_error (void *cls)
629 * and continue to process the result. 634 * and continue to process the result.
630 * 635 *
631 * @param cls the 'struct Request' we are processing 636 * @param cls the 'struct Request' we are processing
632 * @param zone private key of the zone; NULL on disconnect 637 * @param zonekey private key of the zone; NULL on disconnect
633 * @param label label of the records; NULL on disconnect 638 * @param label label of the records; NULL on disconnect
634 * @param rd_count number of entries in @a rd array, 0 if label was deleted 639 * @param rd_count number of entries in @a rd array, 0 if label was deleted
635 * @param rd array of records with data to store 640 * @param rd array of records with data to store
636 */ 641 */
637static void 642static void
638lookup_block_processor (void *cls, 643lookup_block_processor (void *cls,
639 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 644 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zonekey,
640 const char *label, 645 const char *label,
641 unsigned int rd_count, 646 unsigned int rd_count,
642 const struct GNUNET_GNSRECORD_Data *rd) 647 const struct GNUNET_GNSRECORD_Data *rd)
@@ -645,7 +650,7 @@ lookup_block_processor (void *cls,
645 650
646 (void) label; 651 (void) label;
647 (void) rd; 652 (void) rd;
648 (void) zone; 653 (void) zonekey;
649 request->qe = NULL; 654 request->qe = NULL;
650 if (0 == rd_count) 655 if (0 == rd_count)
651 { 656 {
@@ -1087,9 +1092,12 @@ run (void *cls,
1087 _("Failed to connect to identity\n")); 1092 _("Failed to connect to identity\n"));
1088 return; 1093 return;
1089 } 1094 }
1090 id_op = GNUNET_IDENTITY_get (identity, "fcfsd", 1095 id_op = GNUNET_IDENTITY_get (identity,
1091 &identity_cb, NULL); 1096 zone,
1092 GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL); 1097 &identity_cb,
1098 NULL);
1099 GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
1100 NULL);
1093} 1101}
1094 1102
1095 1103
@@ -1104,7 +1112,13 @@ int
1104main (int argc, 1112main (int argc,
1105 char *const *argv) 1113 char *const *argv)
1106{ 1114{
1107 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 1115 struct GNUNET_GETOPT_CommandLineOption options[] = {
1116 GNUNET_GETOPT_option_mandatory
1117 (GNUNET_GETOPT_option_string ('z',
1118 "zone",
1119 "EGO",
1120 gettext_noop ("name of the zone that is to be managed by FCFSD"),
1121 &zone)),
1108 GNUNET_GETOPT_OPTION_END 1122 GNUNET_GETOPT_OPTION_END
1109 }; 1123 };
1110 int ret; 1124 int ret;