diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-02-07 15:59:04 +0100 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-02-07 15:59:04 +0100 |
commit | 14b3c75ab523830f5c1744d5a0faa4168b4172a7 (patch) | |
tree | eecc64f41891b29f5c1edd42f9315a2ab2733c59 /src/zonemaster | |
parent | 1c89bfe03f45eef178a1e5a5d4d33057946ebf11 (diff) | |
download | gnunet-14b3c75ab523830f5c1744d5a0faa4168b4172a7.tar.gz gnunet-14b3c75ab523830f5c1744d5a0faa4168b4172a7.zip |
GNS: LSD0001 improvements
NAMESTORE: Better error handling. Fixed private record feature.
GNSRECORD: Record inconsistency check for delegation and redirection
records
Diffstat (limited to 'src/zonemaster')
-rw-r--r-- | src/zonemaster/gnunet-service-zonemaster-monitor.c | 20 | ||||
-rw-r--r-- | src/zonemaster/gnunet-service-zonemaster.c | 20 |
2 files changed, 32 insertions, 8 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster-monitor.c b/src/zonemaster/gnunet-service-zonemaster-monitor.c index fef9e6b82..6474228f4 100644 --- a/src/zonemaster/gnunet-service-zonemaster-monitor.c +++ b/src/zonemaster/gnunet-service-zonemaster-monitor.c | |||
@@ -288,6 +288,7 @@ handle_monitor_event (void *cls, | |||
288 | unsigned int rd_fresh_count; | 288 | unsigned int rd_fresh_count; |
289 | struct DhtPutActivity *ma; | 289 | struct DhtPutActivity *ma; |
290 | struct GNUNET_TIME_Absolute expire; | 290 | struct GNUNET_TIME_Absolute expire; |
291 | char *emsg; | ||
291 | 292 | ||
292 | (void) cls; | 293 | (void) cls; |
293 | GNUNET_STATISTICS_update (statistics, | 294 | GNUNET_STATISTICS_update (statistics, |
@@ -300,10 +301,21 @@ handle_monitor_event (void *cls, | |||
300 | label); | 301 | label); |
301 | /* filter out records that are not public, and convert to | 302 | /* filter out records that are not public, and convert to |
302 | absolute expiration time. */ | 303 | absolute expiration time. */ |
303 | rd_public_count = GNUNET_GNSRECORD_convert_records_for_export (rd, | 304 | if (GNUNET_OK != GNUNET_GNSRECORD_convert_records_for_export (label, |
304 | rd_count, | 305 | rd, |
305 | rd_public, | 306 | rd_count, |
306 | &expire); | 307 | rd_public, |
308 | &rd_public_count, | ||
309 | &expire, | ||
310 | &emsg)) | ||
311 | { | ||
312 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
313 | "Zonemaster-monitor failed: %s\n", emsg); | ||
314 | GNUNET_free (emsg); | ||
315 | GNUNET_NAMESTORE_zone_monitor_next (zmon, | ||
316 | 1); | ||
317 | return; /* nothing to do */ | ||
318 | } | ||
307 | if (0 == rd_public_count) | 319 | if (0 == rd_public_count) |
308 | { | 320 | { |
309 | GNUNET_NAMESTORE_zone_monitor_next (zmon, | 321 | GNUNET_NAMESTORE_zone_monitor_next (zmon, |
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c index 9eb3432ee..c5dd3348d 100644 --- a/src/zonemaster/gnunet-service-zonemaster.c +++ b/src/zonemaster/gnunet-service-zonemaster.c | |||
@@ -692,13 +692,25 @@ put_gns_record (void *cls, | |||
692 | unsigned int rd_fresh_count = 0; | 692 | unsigned int rd_fresh_count = 0; |
693 | struct DhtPutActivity *ma; | 693 | struct DhtPutActivity *ma; |
694 | struct GNUNET_TIME_Absolute expire; | 694 | struct GNUNET_TIME_Absolute expire; |
695 | char *emsg; | ||
695 | 696 | ||
696 | (void) cls; | 697 | (void) cls; |
697 | ns_iteration_left--; | 698 | ns_iteration_left--; |
698 | rd_public_count = GNUNET_GNSRECORD_convert_records_for_export (rd, | 699 | if (GNUNET_OK != GNUNET_GNSRECORD_convert_records_for_export (label, |
699 | rd_count, | 700 | rd, |
700 | rd_public, | 701 | rd_count, |
701 | &expire); | 702 | rd_public, |
703 | &rd_public_count, | ||
704 | &expire, | ||
705 | &emsg)) | ||
706 | { | ||
707 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
708 | "Record set inconsistent, moving to next record set: %s\n", | ||
709 | emsg); | ||
710 | GNUNET_free (emsg); | ||
711 | check_zone_namestore_next (); | ||
712 | return; | ||
713 | } | ||
702 | if (0 == rd_public_count) | 714 | if (0 == rd_public_count) |
703 | { | 715 | { |
704 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 716 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |