summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-16 11:40:14 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-22 19:42:28 -0400
commit388d217c40fea4dfd9c2782ae6036126258fc292 (patch)
tree3d6d1e0ee420b96c95f93e36c6a120f9dd87c953 /src
parent948dd2c79ea9ca1fd06c13f275515a1745c46986 (diff)
downloadtor-388d217c40fea4dfd9c2782ae6036126258fc292.tar.gz
tor-388d217c40fea4dfd9c2782ae6036126258fc292.zip
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().
Diffstat (limited to 'src')
-rw-r--r--src/or/routerlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index bc3abb236f..2ab5017b7a 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -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;