diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-21 04:19:04 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-21 04:19:04 +0000 |
commit | 36f4e15e815afa386014de2f624299623cfd889f (patch) | |
tree | 57df00da809a7a1e14c1ae92ab530c61d6f50caa /src/or/hibernate.c | |
parent | bfc2e952300a1f0e7bc8cd849eddec88d5a32f5b (diff) | |
download | tor-36f4e15e815afa386014de2f624299623cfd889f.tar tor-36f4e15e815afa386014de2f624299623cfd889f.tar.gz |
Call init_keys() where needed; fix hibernate bug.
svn:r2924
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r-- | src/or/hibernate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c index 2407fad6c..6719a8857 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -291,6 +291,13 @@ accounting_set_wakeup_time(void) int n_days_to_exhaust_bw; int n_days_to_consider; + if (! identity_key_is_set()) { + if (init_keys() < 0) { + log_fn(LOG_ERR, "Error initializing keys"); + tor_assert(0); + } + } + format_iso_time(buf, interval_start_time); crypto_pk_get_digest(get_identity_key(), digest); |