diff options
author | Roger Dingledine <arma@torproject.org> | 2006-06-09 09:07:59 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-06-09 09:07:59 +0000 |
commit | 6531a31aad038c41670657b2a46d3c67d4b49789 (patch) | |
tree | c5620674c5a9b315a2cd8429c54510c12da33b73 /src | |
parent | 0071d67efda818cdbfe915f25279d99c85f9934e (diff) | |
download | tor-6531a31aad038c41670657b2a46d3c67d4b49789.tar.gz tor-6531a31aad038c41670657b2a46d3c67d4b49789.zip |
actually, don't fix it that far. we should still do some
error checking.
svn:r6576
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitbuild.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 4fc56c2ca3..0e08b03b49 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1817,12 +1817,15 @@ add_an_entry_guard(routerinfo_t *chosen) routerinfo_t *router; entry_guard_t *entry; - if (chosen) + if (chosen) { router = chosen; - else + if (is_an_entry_guard(router->cache_info.identity_digest)) + return NULL; + } else { router = choose_good_entry_server(CIRCUIT_PURPOSE_C_GENERAL, NULL); - if (!router) - return NULL; + if (!router) + return NULL; + } entry = tor_malloc_zero(sizeof(entry_guard_t)); log_info(LD_CIRC, "Chose '%s' as new entry guard.", router->nickname); strlcpy(entry->nickname, router->nickname, sizeof(entry->nickname)); |