gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: FCFSD: Allow configuration of relative e


From: gnunet
Subject: [gnunet] branch master updated: FCFSD: Allow configuration of relative expiration time of added records
Date: Mon, 09 May 2022 09:00:59 +0200

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 2c589fcdf FCFSD: Allow configuration of relative expiration time of 
added records
2c589fcdf is described below

commit 2c589fcdf9eb24144786b8800cbba1c99a9452e8
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon May 9 09:00:52 2022 +0200

    FCFSD: Allow configuration of relative expiration time of added records
---
 contrib/gana                           |  2 +-
 src/namestore/gnunet-namestore-fcfsd.c | 20 ++++++++++++++++++--
 src/namestore/namestore.conf.in        |  1 +
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/contrib/gana b/contrib/gana
index 0958add54..f2babbbdd 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 0958add542378a6ca9c411e2dc19527834e9f645
+Subproject commit f2babbbdd477eeafb17292e16f335226ea02cb6a
diff --git a/src/namestore/gnunet-namestore-fcfsd.c 
b/src/namestore/gnunet-namestore-fcfsd.c
index 5b13e50ff..7e96ffa43 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -164,6 +164,11 @@ static struct StaticPage *notfound_page = NULL;
  */
 static struct StaticPage *forbidden_page = NULL;
 
+/**
+ * The relative expiration time for added records
+ */
+static struct GNUNET_TIME_Relative record_exp;
+
 /**
  * Task ran at shutdown to clean up everything.
  *
@@ -532,8 +537,8 @@ register_do_cb (void *cls,
   }
 
   gd.data = gdraw;
-  gd.expiration_time = UINT64_MAX;
-  gd.flags = GNUNET_GNSRECORD_RF_NONE;
+  gd.expiration_time = record_exp.rel_value_us;
+  gd.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
 
   rd->searching = GNUNET_NAMESTORE_records_store (namestore,
                                                   zone_key,
@@ -1062,6 +1067,17 @@ run_service (void *cls,
 
   GNUNET_log_setup ("fcfsd", "WARNING", NULL);
 
+  if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (cfg,
+                                                        "fcfsd",
+                                                        
"RELATIVE_RECORD_EXPIRATION",
+                                                        &record_exp))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                _("No expiration specified for records.\n"));
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
+
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
                                                           "fcfsd",
                                                           "HTTPPORT",
diff --git a/src/namestore/namestore.conf.in b/src/namestore/namestore.conf.in
index 733e4e2f8..a9c928c66 100644
--- a/src/namestore/namestore.conf.in
+++ b/src/namestore/namestore.conf.in
@@ -44,6 +44,7 @@ gns = gnunet-namestore -e 1a -u
 BINARY = gnunet-namestore-fcfsd
 START_ON_DEMAND = NO
 UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-fcfsd.sock
+RELATIVE_RECORD_EXPIRATION = 7 d
 
 # On what port does the FCFS daemon listen for HTTP clients?
 HTTPPORT = 18080

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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