diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-02-05 15:33:00 +0100 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-02-05 15:33:00 +0100 |
commit | 523145961acbb8a5c07b9809cc0d8de740e0dea0 (patch) | |
tree | 92a627afa5799d78df0fd5b09a711ca3b89a8b6b | |
parent | 5b9e6518a44b128cca314f3c9d9acb3c7028a871 (diff) |
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index dc2927dd5..cebdf38c5 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -1564,7 +1564,6 @@ handle_record_store (void *cls, const struct RecordStoreMessage *rp_msg) request if one existed in the old set. This is why we (may) need one additional record */ struct GNUNET_GNSRECORD_Data rd_clean[GNUNET_NZL (rd_count) + 1]; - struct GNUNET_TIME_Absolute now; unsigned int rd_clean_off; int have_nick; int have_tombstone; @@ -1599,25 +1598,22 @@ handle_record_store (void *cls, const struct RecordStoreMessage *rp_msg) } } /* At this point we are either zonemaster and have set a new tombstone - * (have_tombstone) or are are not zonemaster and we may want to + * (have_tombstone) or we are not zonemaster and we may want to * add the old tombstone (if there was any and if it is not already * old). */ if ((GNUNET_NO == have_tombstone) && - (0 != tombstone.time_of_death.abs_value_us__)) + GNUNET_TIME_absolute_cmp (GNUNET_TIME_absolute_get (), (<), + GNUNET_TIME_absolute_ntoh ( + tombstone.time_of_death))) { - now = GNUNET_TIME_absolute_get (); - if (GNUNET_TIME_absolute_cmp (now, <, GNUNET_TIME_absolute_ntoh ( - tombstone.time_of_death))) - { - rd_clean[rd_clean_off].record_type = GNUNET_GNSRECORD_TYPE_TOMBSTONE; - rd_clean[rd_clean_off].expiration_time = - GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; - rd_clean[rd_clean_off].data = &tombstone; - rd_clean[rd_clean_off].data_size = sizeof (tombstone); - rd_clean[rd_clean_off].flags |= GNUNET_GNSRECORD_RF_PRIVATE; - rd_clean_off++; - } + rd_clean[rd_clean_off].record_type = GNUNET_GNSRECORD_TYPE_TOMBSTONE; + rd_clean[rd_clean_off].expiration_time = + GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; + rd_clean[rd_clean_off].data = &tombstone; + rd_clean[rd_clean_off].data_size = sizeof (tombstone); + rd_clean[rd_clean_off].flags |= GNUNET_GNSRECORD_RF_PRIVATE; + rd_clean_off++; } if ((0 == strcmp (GNUNET_GNS_EMPTY_LABEL_AT, conv_name)) && (GNUNET_NO == have_nick)) |