aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-07-14 16:41:47 +0000
committerNick Mathewson <nickm@torproject.org>2005-07-14 16:41:47 +0000
commit331942870e218c262b8c9ad821d29837e79252c8 (patch)
tree921d472b8584ed5ef7a551a59965603c886114f9 /src/or
parent149e9a590070891fbd73d0fccec8b2256ce6aff7 (diff)
downloadtor-331942870e218c262b8c9ad821d29837e79252c8.tar
tor-331942870e218c262b8c9ad821d29837e79252c8.tar.gz
fix problems noticed by arma in rendservice.c
svn:r4558
Diffstat (limited to 'src/or')
-rw-r--r--src/or/rendservice.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index a5c43ed2c..0da27b2de 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -592,8 +592,8 @@ rend_service_relaunch_rendezvous(circuit_t *oldcirc)
oldcirc->build_state->failure_count > MAX_REND_FAILURES ||
oldcirc->build_state->expiry_time < time(NULL)) {
log_fn(LOG_INFO,"Attempt to build circuit to %s for rendezvous has failed too many times or expired; giving up.",
- oldcirc->build_state->chosen_exit->nickname);
- /* XXX bug: if the first clause of the if triggers, we'll seg fault. */
+ oldcirc->build_state ? oldcirc->build_state->chosen_exit->nickname :
+ "*unknown*");
return;
}
@@ -831,9 +831,8 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest)
while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest,
CIRCUIT_PURPOSE_S_INTRO))) {
tor_assert(circ->cpath);
- /* XXX this is a bug. ->nickname will always be there. */
- if (circ->build_state->chosen_exit->nickname &&
- !strcasecmp(circ->build_state->chosen_exit->nickname, router->nickname)) {
+ if (!strcasecmp(circ->build_state->chosen_exit->nickname,
+ router->nickname)) {
return circ;
}
}
@@ -842,9 +841,8 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest)
while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest,
CIRCUIT_PURPOSE_S_ESTABLISH_INTRO))) {
tor_assert(circ->cpath);
- /* XXX this is a bug. ->nickname will always be there. */
- if (circ->build_state->chosen_exit->nickname &&
- !strcasecmp(circ->build_state->chosen_exit->nickname, router->nickname)) {
+ if (!strcasecmp(circ->build_state->chosen_exit->nickname,
+ router->nickname)) {
return circ;
}
}