diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-08-30 15:04:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-08-30 15:04:24 +0000 |
commit | 0b92c28d84c1e0ac30a6b21e0189b4968961e008 (patch) | |
tree | 39a5ef2e289dd7c7ad1e3c99454cda38bacb847b /src/or/routerparse.c | |
parent | 6a52aa52fe76de8efabf01a95103af87a178f5dd (diff) | |
download | tor-0b92c28d84c1e0ac30a6b21e0189b4968961e008.tar.gz tor-0b92c28d84c1e0ac30a6b21e0189b4968961e008.zip |
Actually set is_hibernating when parsing router descriptors.
svn:r4888
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 14d16f62ff..6e4da3e47d 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -968,6 +968,15 @@ router_parse_entry_from_string(const char *s, const char *end) } } + if ((tok = find_first_by_keyword(tokens, K_HIBERNATING))) { + if (tok->n_args < 1) { + log_fn(LOG_WARN, "Too few args on 'hibernating' keyword. Skipping."); + } else { + router->is_hibernating + = (tor_parse_long(tok->args[0],10,0,LONG_MAX,NULL,NULL) != 0); + } + } + if (!(tok = find_first_by_keyword(tokens, K_PUBLISHED))) { log_fn(LOG_WARN, "Missing published time"); goto err; } |