mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Set offset properly when parsing cache.
svn:r6677
This commit is contained in:
@@ -682,15 +682,17 @@ router_parse_list_from_string(const char **s, smartlist_t *dest,
|
||||
router = router_parse_entry_from_string(*s, end,
|
||||
saved_location != SAVED_IN_CACHE);
|
||||
|
||||
*s = end;
|
||||
|
||||
if (!router) {
|
||||
log_warn(LD_DIR, "Error reading router; skipping");
|
||||
*s = end;
|
||||
continue;
|
||||
}
|
||||
if (saved_location != SAVED_NOWHERE) {
|
||||
router->cache_info.saved_location = saved_location;
|
||||
router->cache_info.saved_offset = *s - start;
|
||||
}
|
||||
*s = end;
|
||||
smartlist_add(dest, router);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user