diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-16 14:26:23 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-16 14:26:23 +0000 |
commit | ed24a4f8073b84253ff1501789d14abbdecf7a06 (patch) | |
tree | 8973a6f99e605d8403532bf622394a3f3b558517 | |
parent | f84fa39d8761a1062141ef813472cdc3efec8a06 (diff) | |
download | tor-ed24a4f8073b84253ff1501789d14abbdecf7a06.tar.gz tor-ed24a4f8073b84253ff1501789d14abbdecf7a06.zip |
fix a pair of duplicate mark-for-closes
svn:r1643
-rw-r--r-- | src/or/connection_edge.c | 1 | ||||
-rw-r--r-- | src/or/rendservice.c | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 802cb38506..43bf6d52e8 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1177,6 +1177,7 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) { if(rend_service_set_connection_addr_port(n_stream, circ) < 0) { log_fn(LOG_INFO,"Didn't find rendezvous service (port %d)",n_stream->port); connection_mark_for_close(n_stream, END_STREAM_REASON_EXITPOLICY); + circuit_mark_for_close(circ); /* knock the whole thing down, somebody screwed up */ return 0; } assert_circuit_ok(circ); diff --git a/src/or/rendservice.c b/src/or/rendservice.c index ae793f1756..a80057c483 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -892,14 +892,13 @@ rend_service_set_connection_addr_port(connection_t *conn, circuit_t *circ) log_fn(LOG_DEBUG,"beginning to hunt for addr/port"); if (base32_encode(serviceid, REND_SERVICE_ID_LEN+1, circ->rend_pk_digest,10)) { + log_fn(LOG_WARN,"bug: base32 failed"); return -1; } service = rend_service_get_by_pk_digest(circ->rend_pk_digest); if (!service) { log_fn(LOG_WARN, "Couldn't find any service associated with pk %s on rendezvous circuit %d; closing", serviceid, circ->n_circ_id); - circuit_mark_for_close(circ); - connection_mark_for_close(conn, 0/*XXX*/); return -1; } for (i = 0; i < smartlist_len(service->ports); ++i) { @@ -910,9 +909,8 @@ rend_service_set_connection_addr_port(connection_t *conn, circuit_t *circ) return 0; } } - log_fn(LOG_WARN, "No virtual port mapping exists for port %d on service %s", + log_fn(LOG_INFO, "No virtual port mapping exists for port %d on service %s", conn->port,serviceid); - connection_mark_for_close(conn, 0/*XXX*/); return -1; } |