From f0cccc567ecfd318305c4b6bab05091a50532e2a Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 18 Nov 2003 09:53:03 +0000 Subject: bugfix: don't ask for ->next of an expired circuit bugfix: keep going when a circ fails in circuit_n_conn_open (make circuit_enumerate_by_naddr_nport obsolete) bugfix: make circuit_n_conn_open only look at circ's that start at us bugfix: only try circuit_n_conn_open if we're an OP. Otherwise we expect connections to always already be up. bugfix: when choosing path length, pay attention to whether the directory says a router is down. bugfix: when picking good exit, skip routers which are known to be down (more work needs to be done on this one) svn:r838 --- src/or/connection_or.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/or/connection_or.c') diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 9eb064fac..bd2711230 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -203,8 +203,8 @@ static int connection_tls_finish_handshake(connection_t *conn) { log_fn(LOG_DEBUG, "Other side claims to be '%s'", nickname); pk = tor_tls_verify(conn->tls); if(!pk) { - log_fn(LOG_WARN,"Other side (%s:%d) has a cert but it's invalid. Closing.", - conn->address, conn->port); + log_fn(LOG_WARN,"Other side '%s' (%s:%d) has a cert but it's invalid. Closing.", + nickname, conn->address, conn->port); return -1; } router = router_get_by_link_pk(pk); @@ -230,7 +230,7 @@ static int connection_tls_finish_handshake(connection_t *conn) { } connection_or_init_conn_from_router(conn, router); crypto_free_pk_env(pk); - } + } if (strcmp(conn->nickname, nickname)) { log_fn(LOG_WARN,"Other side claims to be '%s', but we wanted '%s'", nickname, conn->nickname); @@ -239,8 +239,8 @@ static int connection_tls_finish_handshake(connection_t *conn) { if (!options.OnionRouter) { /* If I'm an OP... */ conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP; + circuit_n_conn_open(conn); /* send the pending creates, if any. */ } - circuit_n_conn_open(conn); /* send the pending creates, if any. */ return 0; } -- cgit v1.2.3