mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
if we can't read bandwidthrate, at least tell us what it was.
svn:r9640
This commit is contained in:
parent
988092f674
commit
fc81b71055
@ -814,10 +814,19 @@ router_parse_entry_from_string(const char *s, const char *end,
|
||||
}
|
||||
router->bandwidthrate =
|
||||
tor_parse_long(tok->args[0],10,0,INT_MAX,NULL,NULL);
|
||||
|
||||
if (!router->bandwidthrate) {
|
||||
log_warn(LD_DIR, "bandwidthrate %s unreadable or 0. Failing.",
|
||||
escaped(tok->args[0]));
|
||||
goto err;
|
||||
}
|
||||
|
||||
router->bandwidthburst =
|
||||
tor_parse_long(tok->args[1],10,0,INT_MAX,NULL,NULL);
|
||||
router->bandwidthcapacity =
|
||||
tor_parse_long(tok->args[2],10,0,INT_MAX,NULL,NULL);
|
||||
|
||||
/* XXX we don't error-check these values? -RD */
|
||||
}
|
||||
|
||||
if ((tok = find_first_by_keyword(tokens, K_UPTIME))) {
|
||||
@ -953,10 +962,7 @@ router_parse_entry_from_string(const char *s, const char *end,
|
||||
log_warn(LD_DIR,"or_port unreadable or 0. Failing.");
|
||||
goto err;
|
||||
}
|
||||
if (!router->bandwidthrate) {
|
||||
log_warn(LD_DIR,"bandwidthrate unreadable or 0. Failing.");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!router->platform) {
|
||||
router->platform = tor_strdup("<unknown>");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user