aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-25 16:23:04 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-25 16:23:04 +0200
commit3c62493eb1aaa74812bbb79431686d99652417f4 (patch)
treefa3cede90f0387305bc996f14dbd191c451e19e1
parent4dc79497d7f745996068e62e973e34d220580323 (diff)
more logging of exp time
-rw-r--r--src/namestore/gnunet-service-namestore.c26
-rw-r--r--src/namestore/gnunet-zoneimport.c4
2 files changed, 16 insertions, 14 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 2fffbeba77..f8ac6c31c9 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -688,6 +688,7 @@ refresh_block (struct NamestoreClient *nc,
struct GNUNET_GNSRECORD_Data *nick;
struct GNUNET_GNSRECORD_Data *res;
unsigned int res_count;
+ struct GNUNET_TIME_Absolute exp_time;
nick = get_nick_record (zone_key);
res_count = rd_count;
@@ -702,26 +703,23 @@ refresh_block (struct NamestoreClient *nc,
GNUNET_free (nick);
}
- if (0 == res_count)
- block = GNUNET_GNSRECORD_block_create (zone_key,
- GNUNET_TIME_UNIT_ZERO_ABS,
- name,
- res,
- rd_count);
- else
- block = GNUNET_GNSRECORD_block_create (zone_key,
- GNUNET_GNSRECORD_record_get_expiration_time (res_count,
- res),
- name,
- res,
- res_count);
+ exp_time = (0 == res_count)
+ ? GNUNET_TIME_UNIT_ZERO_ABS
+ : GNUNET_GNSRECORD_record_get_expiration_time (res_count,
+ res);
+ block = GNUNET_GNSRECORD_block_create (zone_key,
+ exp_time,
+ name,
+ res,
+ res_count);
GNUNET_assert (NULL != block);
GNUNET_CRYPTO_ecdsa_key_get_public (zone_key,
&pkey);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Caching block for label `%s' with %u records in zone `%s' in namecache\n",
+ "Caching block for label `%s' with %u records and expiration %s in zone `%s' in namecache\n",
name,
res_count,
+ GNUNET_STRINGS_absolute_time_to_string (exp_time),
GNUNET_GNSRECORD_z2s (&pkey));
GNUNET_STATISTICS_update (statistics,
"Namecache updates pushed",
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c
index c26d33bad9..faef436ac4 100644
--- a/src/namestore/gnunet-zoneimport.c
+++ b/src/namestore/gnunet-zoneimport.c
@@ -676,6 +676,10 @@ process_record (void *cls,
req->hostname);
return; /* record expired */
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "DNS returned record that expires at %s for `%s'\n",
+ GNUNET_STRINGS_absolute_time_to_string (rec->expiration_time),
+ req->hostname);
switch (rec->type)
{
case GNUNET_DNSPARSER_TYPE_NS: