mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Use node_has_preferred_descriptor() in another case
In router_add_running_nodes_to_smartlist(), we had an inline implementation of the logic from node_has_descriptor(), which should be changed to node_has_preferred_descriptor().
This commit is contained in:
parent
948dd2c79e
commit
388d217c40
@ -2335,7 +2335,7 @@ router_add_running_nodes_to_smartlist(smartlist_t *sl, int need_uptime,
|
||||
SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), const node_t *, node) {
|
||||
if (!node->is_running || !node->is_valid)
|
||||
continue;
|
||||
if (need_desc && !(node->ri || (node->rs && node->md)))
|
||||
if (need_desc && !node_has_preferred_descriptor(node, direct_conn))
|
||||
continue;
|
||||
if (node->ri && node->ri->purpose != ROUTER_PURPOSE_GENERAL)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user