diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-30 12:03:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-05-30 12:03:03 -0400 |
commit | bdc59e33c13672b64d5d52dfc395f9e80c6ed528 (patch) | |
tree | 4a794ca44984c7da5f132b274e4961179fc80e3f /src | |
parent | 4165b1a0da893a9f67a2ba32b4fcd54a7804ce14 (diff) | |
download | tor-bdc59e33c13672b64d5d52dfc395f9e80c6ed528.tar.gz tor-bdc59e33c13672b64d5d52dfc395f9e80c6ed528.zip |
Fix a warning on unnamed nodes in node_get_by_nickname().
There was a > that should have been an ==, and a missing !. These
together prevented us from issuing a warning in the case that a
nickname matched an Unnamed node only.
Fixes bug 19203; bugfix on 0.2.3.1-alpha.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/nodelist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 2f272a1d56..880b795787 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -587,10 +587,10 @@ node_get_by_nickname,(const char *nickname, int warn_if_unnamed)) "but none is listed as Named in the directory consensus. " "Choosing one arbitrarily.", nickname); } - } else if (smartlist_len(matches)>1 && warn_if_unnamed) { + } else if (smartlist_len(matches)==1 && warn_if_unnamed) { char fp[HEX_DIGEST_LEN+1]; node_t *node = smartlist_get(matches, 0); - if (node->name_lookup_warned) { + if (! node->name_lookup_warned) { base16_encode(fp, sizeof(fp), node->identity, DIGEST_LEN); log_warn(LD_CONFIG, "You specified a server \"%s\" by name, but the directory " |