[tor-commits] [tor] 02/04: don't emit key expiration metric instead of setting it to zero
gitolite role
git at cupani.torproject.org
Wed May 24 14:45:50 UTC 2023
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main
in repository tor.
commit 0c634999c13bdf40843924d54fc3294136774788
Author: trinity-1686a <trinity at deuxfleurs.fr>
AuthorDate: Sun Mar 19 10:31:28 2023 +0100
don't emit key expiration metric instead of setting it to zero
---
src/feature/relay/relay_metrics.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/feature/relay/relay_metrics.c b/src/feature/relay/relay_metrics.c
index 2e68475f29..6ee75f69f0 100644
--- a/src/feature/relay/relay_metrics.c
+++ b/src/feature/relay/relay_metrics.c
@@ -1009,18 +1009,15 @@ fill_signing_cert_expiry(void)
const tor_cert_t *signing_key;
const relay_metrics_entry_t *rentry =
&base_metrics[RELAY_METRICS_SIGNING_CERT_EXPIRY];
- uint64_t valid_until = 0;
-
- sentry = metrics_store_add(the_store, rentry->type, rentry->name,
- rentry->help);
if (get_options()->OfflineMasterKey) {
signing_key = get_master_signing_key_cert();
if (signing_key) {
- valid_until = signing_key->valid_until;
+ sentry = metrics_store_add(the_store, rentry->type, rentry->name,
+ rentry->help);
+ metrics_store_entry_update(sentry, signing_key->valid_until);
}
}
- metrics_store_entry_update(sentry, valid_until);
}
/** Reset the global store and fill it with all the metrics from base_metrics
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tor-commits
mailing list