mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Remove networkstatus_nickname_is_unnamed()
This commit is contained in:
parent
4ace1b96ac
commit
42b5e3cbb7
@ -804,16 +804,6 @@ networkstatus_get_router_digest_by_nickname(const char *nickname)
|
|||||||
return strmap_get_lc(named_server_map, nickname);
|
return strmap_get_lc(named_server_map, nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return true iff <b>nickname</b> is disallowed from being the nickname
|
|
||||||
* of any server. */
|
|
||||||
int
|
|
||||||
networkstatus_nickname_is_unnamed(const char *nickname)
|
|
||||||
{
|
|
||||||
if (!unnamed_server_map)
|
|
||||||
return 0;
|
|
||||||
return strmap_get_lc(unnamed_server_map, nickname) != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** How frequently do directory authorities re-download fresh networkstatus
|
/** How frequently do directory authorities re-download fresh networkstatus
|
||||||
* documents? */
|
* documents? */
|
||||||
#define AUTHORITY_NS_CACHE_INTERVAL (10*60)
|
#define AUTHORITY_NS_CACHE_INTERVAL (10*60)
|
||||||
|
@ -63,7 +63,6 @@ MOCK_DECL(routerstatus_t *,
|
|||||||
router_get_mutable_consensus_status_by_descriptor_digest,
|
router_get_mutable_consensus_status_by_descriptor_digest,
|
||||||
(networkstatus_t *consensus, const char *digest));
|
(networkstatus_t *consensus, const char *digest));
|
||||||
const char *networkstatus_get_router_digest_by_nickname(const char *nickname);
|
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);
|
int we_want_to_fetch_flavor(const or_options_t *options, int flavor);
|
||||||
int we_want_to_fetch_unknown_auth_certs(const or_options_t *options);
|
int we_want_to_fetch_unknown_auth_certs(const or_options_t *options);
|
||||||
void networkstatus_consensus_download_failed(int status_code,
|
void networkstatus_consensus_download_failed(int status_code,
|
||||||
|
@ -859,14 +859,6 @@ node_get_by_nickname,(const char *nickname, unsigned flags))
|
|||||||
return node_get_by_id(named_id);
|
return node_get_by_id(named_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is it marked as owned-by-someone-else? */
|
|
||||||
if (networkstatus_nickname_is_unnamed(nickname)) {
|
|
||||||
log_info(LD_GENERAL, "The name %s is listed as Unnamed: there is some "
|
|
||||||
"router that holds it, but not one listed in the current "
|
|
||||||
"consensus.", escaped(nickname));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Okay, so the name is not canonical for anybody. */
|
/* Okay, so the name is not canonical for anybody. */
|
||||||
{
|
{
|
||||||
smartlist_t *matches = smartlist_new();
|
smartlist_t *matches = smartlist_new();
|
||||||
|
Loading…
Reference in New Issue
Block a user