aboutsummaryrefslogtreecommitdiff
path: root/src/zonemaster/gnunet-service-zonemaster-monitor.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-13 21:17:12 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-13 21:17:12 +0200
commit98ac2b34f979cf10da24c984e690dabf7b34794b (patch)
treeed4fd15409066b5403f02c23aab9e14b179bc874 /src/zonemaster/gnunet-service-zonemaster-monitor.c
parentfa2978883e1585b1eeff3a22b7a9b4f174a45ca3 (diff)
downloadgnunet-98ac2b34f979cf10da24c984e690dabf7b34794b.tar.gz
gnunet-98ac2b34f979cf10da24c984e690dabf7b34794b.zip
add some extra GNS-record well-formedness checks if logging is enabled
Diffstat (limited to 'src/zonemaster/gnunet-service-zonemaster-monitor.c')
-rw-r--r--src/zonemaster/gnunet-service-zonemaster-monitor.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster-monitor.c b/src/zonemaster/gnunet-service-zonemaster-monitor.c
index 46feb117f..f7ae55ba7 100644
--- a/src/zonemaster/gnunet-service-zonemaster-monitor.c
+++ b/src/zonemaster/gnunet-service-zonemaster-monitor.c
@@ -214,16 +214,14 @@ convert_records_for_export (const struct GNUNET_GNSRECORD_Data *rd,
214 rd_public_count = 0; 214 rd_public_count = 0;
215 now = GNUNET_TIME_absolute_get (); 215 now = GNUNET_TIME_absolute_get ();
216 for (unsigned int i=0;i<rd_count;i++) 216 for (unsigned int i=0;i<rd_count;i++)
217 if (0 == (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE)) 217 {
218 { 218 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE))
219 rd_public[rd_public_count] = rd[i]; 219 continue;
220 if (rd_public[rd_public_count].expiration_time < now.abs_value_us) 220 if ( (0 == (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) &&
221 { 221 (rd[i].expiration_time < now.abs_value_us) )
222 /* record already expired, skip it */ 222 continue; /* record already expired, skip it */
223 continue; 223 rd_public[rd_public_count++] = rd[i];
224 } 224 }
225 rd_public_count++;
226 }
227 return rd_public_count; 225 return rd_public_count;
228} 226}
229 227