mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Fall back to routerlist instead of descriptor_list when we are a cache.
svn:r4837
This commit is contained in:
parent
4dc3cb9fd9
commit
e68bed8782
@ -1275,6 +1275,19 @@ dirserv_get_networkstatus_v2(const char **directory, const char *key,
|
|||||||
void
|
void
|
||||||
dirserv_get_routerdescs(smartlist_t *descs_out, const char *key)
|
dirserv_get_routerdescs(smartlist_t *descs_out, const char *key)
|
||||||
{
|
{
|
||||||
|
smartlist_t *complete_list;
|
||||||
|
|
||||||
|
/* This is annoying. Can we unify these? */
|
||||||
|
if (descriptor_list)
|
||||||
|
complete_list = descriptor_list;
|
||||||
|
else {
|
||||||
|
routerlist_t *rlst;
|
||||||
|
router_get_routerlist(&rlst);
|
||||||
|
complete_list = rlst->routers;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!complete_list)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!strcmp(key, "/tor/server/all")) {
|
if (!strcmp(key, "/tor/server/all")) {
|
||||||
smartlist_add_all(descs_out, descriptor_list);
|
smartlist_add_all(descs_out, descriptor_list);
|
||||||
|
Loading…
Reference in New Issue
Block a user