aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-10-17 05:23:48 +0000
committerRoger Dingledine <arma@torproject.org>2003-10-17 05:23:48 +0000
commit0b1afa951ed10750d6ddccd4eb1014bb82fa8220 (patch)
treedcc5fbfb1e965c71a4691a1f959e89ec9b3bb56b /src
parent5c563939ef7048749b775d3e2bf5dc26b39161d2 (diff)
downloadtor-0b1afa951ed10750d6ddccd4eb1014bb82fa8220.tar
tor-0b1afa951ed10750d6ddccd4eb1014bb82fa8220.tar.gz
reload the fingerprints file on HUP
svn:r611
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 49045ed5b..ffe5d00d7 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -608,6 +608,15 @@ static int do_main_loop(void) {
if(please_reset) {
/* fetch a new directory */
if(options.DirPort) {
+
+ /* reload the fingerprint file */
+ char keydir[512];
+ sprintf(keydir,"%s/approved-routers", options.DataDirectory);
+ log_fn(LOG_INFO,"Reloading approved fingerprints from %s...",keydir);
+ if(dirserv_parse_fingerprint_file(keydir) < 0) {
+ log_fn(LOG_WARN, "Error reloading fingerprints. Continuing with old list.");
+ }
+
if(router_get_list_from_file(options.RouterFile) < 0) {
log(LOG_WARN,"Error reloading router list. Continuing with old list.");
}