Set offset properly when parsing cache.

svn:r6677
This commit is contained in:
Nick Mathewson
2006-06-22 07:19:28 +00:00
parent 58b05fc84d
commit 89a1453776
+3 -1
View File
@@ -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);
}