diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-22 19:04:31 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-22 19:13:40 -0400 |
commit | 80d3887360548b28fe2bd06501f0d51d0a1ba4f0 (patch) | |
tree | 39005c027d4c49d4860e5a6e4272a67bf0e716fe /src/or/networkstatus.h | |
parent | d7a3e336ee505bcbeb30117d91067810ad096130 (diff) | |
download | tor-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/networkstatus.h')
-rw-r--r-- | src/or/networkstatus.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h index f9320747d2..145be37d12 100644 --- a/src/or/networkstatus.h +++ b/src/or/networkstatus.h @@ -62,9 +62,6 @@ const routerstatus_t *router_get_consensus_status_by_descriptor_digest( MOCK_DECL(routerstatus_t *, router_get_mutable_consensus_status_by_descriptor_digest, (networkstatus_t *consensus, const char *digest)); -const routerstatus_t *router_get_consensus_status_by_nickname( - const char *nickname, - int warn_if_unnamed); const char *networkstatus_get_router_digest_by_nickname(const char *nickname); int networkstatus_nickname_is_unnamed(const char *nickname); int we_want_to_fetch_flavor(const or_options_t *options, int flavor); |