summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-01-30 22:19:31 +0000
committerNick Mathewson <nickm@torproject.org>2007-01-30 22:19:31 +0000
commit1894e7ea01154d91c3842926a71ae32843264a24 (patch)
tree606e620000dad87fd09f626ccc9166f2e2216ea0 /src/or/circuitbuild.c
parent263a72d7f91d6b41eeda89d88828d29fe607fc95 (diff)
downloadtor-1894e7ea01154d91c3842926a71ae32843264a24.tar.gz
tor-1894e7ea01154d91c3842926a71ae32843264a24.zip
r11606@catbus: nickm | 2007-01-30 16:52:23 -0500
Write the entry guards section of path-spec; note a possible bug in cirbuitbuild.c; add a const; defer work on torrc.complete to be part of a bigger config documentation reorg. svn:r9465
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index becfaf89fa..847f079a3a 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1918,7 +1918,7 @@ num_live_entry_guards(void)
/** Return 1 if <b>digest</b> matches the identity of any node
* in the entry_guards list. Else return 0. */
static INLINE int
-is_an_entry_guard(char *digest)
+is_an_entry_guard(const char *digest)
{
SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry,
if (!memcmp(digest, entry->identity, DIGEST_LEN))
@@ -2219,6 +2219,11 @@ entry_guard_register_connect_status(const char *digest, int succeeded,
r = entry_is_live(e, 0, 1, 1);
if (r && !r->is_running) {
refuse_conn = 1;
+ /* XXXX012 I think this might be broken; when picking entry nodes,
+ * we only look at unreachable_since and is_time_to_retry, and we
+ * pay no attention to is_running. If this is indeed the case, we
+ * can fix the bug by adding a retry_as_entry flag to
+ * routerinfo_t. -NM */
r->is_running = 1;
}
}