diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-04-25 16:23:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-04-25 16:23:04 +0200 |
commit | 3c62493eb1aaa74812bbb79431686d99652417f4 (patch) | |
tree | fa3cede90f0387305bc996f14dbd191c451e19e1 /src | |
parent | 4dc79497d7f745996068e62e973e34d220580323 (diff) | |
download | gnunet-3c62493eb1aaa74812bbb79431686d99652417f4.tar.gz gnunet-3c62493eb1aaa74812bbb79431686d99652417f4.zip |
more logging of exp time
Diffstat (limited to 'src')
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 26 | ||||
-rw-r--r-- | src/namestore/gnunet-zoneimport.c | 4 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 2fffbeba7..f8ac6c31c 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -688,6 +688,7 @@ refresh_block (struct NamestoreClient *nc, | |||
688 | struct GNUNET_GNSRECORD_Data *nick; | 688 | struct GNUNET_GNSRECORD_Data *nick; |
689 | struct GNUNET_GNSRECORD_Data *res; | 689 | struct GNUNET_GNSRECORD_Data *res; |
690 | unsigned int res_count; | 690 | unsigned int res_count; |
691 | struct GNUNET_TIME_Absolute exp_time; | ||
691 | 692 | ||
692 | nick = get_nick_record (zone_key); | 693 | nick = get_nick_record (zone_key); |
693 | res_count = rd_count; | 694 | res_count = rd_count; |
@@ -702,26 +703,23 @@ refresh_block (struct NamestoreClient *nc, | |||
702 | GNUNET_free (nick); | 703 | GNUNET_free (nick); |
703 | } | 704 | } |
704 | 705 | ||
705 | if (0 == res_count) | 706 | exp_time = (0 == res_count) |
706 | block = GNUNET_GNSRECORD_block_create (zone_key, | 707 | ? GNUNET_TIME_UNIT_ZERO_ABS |
707 | GNUNET_TIME_UNIT_ZERO_ABS, | 708 | : GNUNET_GNSRECORD_record_get_expiration_time (res_count, |
708 | name, | 709 | res); |
709 | res, | 710 | block = GNUNET_GNSRECORD_block_create (zone_key, |
710 | rd_count); | 711 | exp_time, |
711 | else | 712 | name, |
712 | block = GNUNET_GNSRECORD_block_create (zone_key, | 713 | res, |
713 | GNUNET_GNSRECORD_record_get_expiration_time (res_count, | 714 | res_count); |
714 | res), | ||
715 | name, | ||
716 | res, | ||
717 | res_count); | ||
718 | GNUNET_assert (NULL != block); | 715 | GNUNET_assert (NULL != block); |
719 | GNUNET_CRYPTO_ecdsa_key_get_public (zone_key, | 716 | GNUNET_CRYPTO_ecdsa_key_get_public (zone_key, |
720 | &pkey); | 717 | &pkey); |
721 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 718 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
722 | "Caching block for label `%s' with %u records in zone `%s' in namecache\n", | 719 | "Caching block for label `%s' with %u records and expiration %s in zone `%s' in namecache\n", |
723 | name, | 720 | name, |
724 | res_count, | 721 | res_count, |
722 | GNUNET_STRINGS_absolute_time_to_string (exp_time), | ||
725 | GNUNET_GNSRECORD_z2s (&pkey)); | 723 | GNUNET_GNSRECORD_z2s (&pkey)); |
726 | GNUNET_STATISTICS_update (statistics, | 724 | GNUNET_STATISTICS_update (statistics, |
727 | "Namecache updates pushed", | 725 | "Namecache updates pushed", |
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c index c26d33bad..faef436ac 100644 --- a/src/namestore/gnunet-zoneimport.c +++ b/src/namestore/gnunet-zoneimport.c | |||
@@ -676,6 +676,10 @@ process_record (void *cls, | |||
676 | req->hostname); | 676 | req->hostname); |
677 | return; /* record expired */ | 677 | return; /* record expired */ |
678 | } | 678 | } |
679 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
680 | "DNS returned record that expires at %s for `%s'\n", | ||
681 | GNUNET_STRINGS_absolute_time_to_string (rec->expiration_time), | ||
682 | req->hostname); | ||
679 | switch (rec->type) | 683 | switch (rec->type) |
680 | { | 684 | { |
681 | case GNUNET_DNSPARSER_TYPE_NS: | 685 | case GNUNET_DNSPARSER_TYPE_NS: |