From 95edd51116c17327f314bc132a0a5f86499e410a Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 8 Mar 2011 14:59:30 -0500 Subject: [PATCH 1/2] make nickm's proposed convention from 2003 be gospel --- doc/HACKING | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/HACKING b/doc/HACKING index 486fe6d10a..bdb86c06c6 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -312,11 +312,11 @@ operation. If a library function is currently called such that failure always means ERR, then the library function should log WARN and let the caller log ERR. -[XXX Proposed convention: every message of severity INFO or higher should -either (A) be intelligible to end-users who don't know the Tor source; or (B) -somehow inform the end-users that they aren't expected to understand the -message (perhaps with a string like "internal error"). Option (A) is to be -preferred to option (B). -NM] +Every message of severity INFO or higher should either (A) be intelligible +to end-users who don't know the Tor source; or (B) somehow inform the +end-users that they aren't expected to understand the message (perhaps +with a string like "internal error"). Option (A) is to be preferred to +option (B). Doxygen ~~~~~~~~ From 9a6df215395750286383eed77f3c49d2b3ef34df Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 8 Mar 2011 15:17:41 -0500 Subject: [PATCH 2/2] Avoid crash in any_pending_bridge_descriptor_fetches This is based on shitlei's fix for bug2629, with extra parens removed. Fixes bug 2629, bugfix on 0.2.1.2-alpha. --- changes/bug2629 | 5 +++++ src/or/circuitbuild.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changes/bug2629 diff --git a/changes/bug2629 b/changes/bug2629 new file mode 100644 index 0000000000..87817cf6e3 --- /dev/null +++ b/changes/bug2629 @@ -0,0 +1,5 @@ + o Minor bugfixes + - Fix a crash bug that could occur occasionally when a client was + configured with a large number of bridges. Fixes bug 2629; bugfix + on 0.2.1.2-alpha. Bugfix by trac user "shitlei". + diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 065eb052ff..76713e676f 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -3200,7 +3200,8 @@ any_pending_bridge_descriptor_fetches(void) conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC && TO_DIR_CONN(conn)->router_purpose == ROUTER_PURPOSE_BRIDGE && !conn->marked_for_close && - conn->linked && !conn->linked_conn->marked_for_close) { + conn->linked && + conn->linked_conn && !conn->linked_conn->marked_for_close) { log_debug(LD_DIR, "found one: %s", conn->address); return 1; }