diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-06-25 00:29:31 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-06-25 00:29:31 +0000 |
commit | 76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7 (patch) | |
tree | 8b833310f12954d9ebf61d267c61f87c7481afbf /src/or/router.c | |
parent | e9b882554e44641011e3ee5be26e7cc200f3dd71 (diff) | |
download | tor-76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7.tar.gz tor-76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7.zip |
Remaining 008pre1 items done; deferred where more design is needed.
More docs and (way more!) testing needed.
Done:
- Authdirservers down directories from others.
- Generate and use running-routers lists
- Cache directories; store across reboots.
- Refactor directory parsing a bit; note potential trouble spots.
svn:r1985
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c index dd6dd452c2..9d386bbad4 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -284,12 +284,14 @@ int init_keys(void) { if(!cp) { log_fn(LOG_INFO,"Cached directory %s not present. Ok.",keydir); } else { - if(dirserv_init_from_directory_string(cp) < 0) { + if(options.AuthoritativeDir && dirserv_load_from_directory_string(cp) < 0){ log_fn(LOG_ERR, "Cached directory %s is corrupt", keydir); free(cp); return -1; } - free(cp); + /* set time to 1 so it will be replaced on first download. + */ + dirserv_set_cached_directory(cp, 1); } /* success */ return 0; |