aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerset.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-22 19:04:31 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-22 19:13:40 -0400
commit80d3887360548b28fe2bd06501f0d51d0a1ba4f0 (patch)
tree39005c027d4c49d4860e5a6e4272a67bf0e716fe /src/or/routerset.c
parentd7a3e336ee505bcbeb30117d91067810ad096130 (diff)
downloadtor-80d3887360548b28fe2bd06501f0d51d0a1ba4f0.tar.gz
tor-80d3887360548b28fe2bd06501f0d51d0a1ba4f0.zip
Refactor node lookup APIs to take flags
Right now there's a single warn_if_unnamed flag for router_get_consensus_status_by_nickname() and node_get_by_nickname(), that is nearly always 1. I've turned it into an 'unsigned' bitfield, and inverted its sense. I've added the flags argument to node_get_by_hex_id() too, though it does nothing there right now. I've removed the router_get_consensus_status_by_nickname() function, since it was only used in once place. This patch changes the warning behavior of GETINFO ns/name/<name>, since all other name lookups from the controller currently warn. Later I'm going to add more flags, for ed25519 support.
Diffstat (limited to 'src/or/routerset.c')
-rw-r--r--src/or/routerset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerset.c b/src/or/routerset.c
index 4906c6a51d..54e26ef943 100644
--- a/src/or/routerset.c
+++ b/src/or/routerset.c
@@ -362,7 +362,7 @@ routerset_get_all_nodes(smartlist_t *out, const routerset_t *routerset,
/* No routers are specified by type; all are given by name or digest.
* we can do a lookup in O(len(routerset)). */
SMARTLIST_FOREACH(routerset->list, const char *, name, {
- const node_t *node = node_get_by_nickname(name, 1);
+ const node_t *node = node_get_by_nickname(name, 0);
if (node) {
if (!running_only || node->is_running)
if (!routerset_contains_node(excludeset, node))