aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-namestore-fcfsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/gnunet-namestore-fcfsd.c')
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c20
1 files changed, 18 insertions, 2 deletions
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
@@ -165,6 +165,11 @@ static struct StaticPage *notfound_page = NULL;
165static struct StaticPage *forbidden_page = NULL; 165static struct StaticPage *forbidden_page = NULL;
166 166
167/** 167/**
168 * The relative expiration time for added records
169 */
170static struct GNUNET_TIME_Relative record_exp;
171
172/**
168 * Task ran at shutdown to clean up everything. 173 * Task ran at shutdown to clean up everything.
169 * 174 *
170 * @param cls unused 175 * @param cls unused
@@ -532,8 +537,8 @@ register_do_cb (void *cls,
532 } 537 }
533 538
534 gd.data = gdraw; 539 gd.data = gdraw;
535 gd.expiration_time = UINT64_MAX; 540 gd.expiration_time = record_exp.rel_value_us;
536 gd.flags = GNUNET_GNSRECORD_RF_NONE; 541 gd.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
537 542
538 rd->searching = GNUNET_NAMESTORE_records_store (namestore, 543 rd->searching = GNUNET_NAMESTORE_records_store (namestore,
539 zone_key, 544 zone_key,
@@ -1062,6 +1067,17 @@ run_service (void *cls,
1062 1067
1063 GNUNET_log_setup ("fcfsd", "WARNING", NULL); 1068 GNUNET_log_setup ("fcfsd", "WARNING", NULL);
1064 1069
1070 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (cfg,
1071 "fcfsd",
1072 "RELATIVE_RECORD_EXPIRATION",
1073 &record_exp))
1074 {
1075 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1076 _("No expiration specified for records.\n"));
1077 GNUNET_SCHEDULER_shutdown ();
1078 return;
1079 }
1080
1065 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, 1081 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
1066 "fcfsd", 1082 "fcfsd",
1067 "HTTPPORT", 1083 "HTTPPORT",