diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-09 15:47:50 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-09 15:47:50 +0000 |
commit | 26283e69ba88896d8aeb9141bdaeff15be916ec8 (patch) | |
tree | 377a1490710afcdd83ebd6e26559a74a1e0a6e9d /src/or/circuitbuild.c | |
parent | b76fd968b4d2deddf2f40f63dc04713f45649c68 (diff) | |
download | tor-26283e69ba88896d8aeb9141bdaeff15be916ec8.tar.gz tor-26283e69ba88896d8aeb9141bdaeff15be916ec8.zip |
r8973@totoro: nickm | 2006-10-09 11:45:47 -0400
Touch up last patch (to add REASON to CIRC events): make some reasons
more sensible, send reasons only to controllers that have enabled
extended events, and clean up whitespace.
svn:r8672
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 5acb4b93d2..9a9ca59b17 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -305,6 +305,7 @@ circuit_establish_circuit(uint8_t purpose, extend_info_t *info, if (onion_pick_cpath_exit(circ, info) < 0 || onion_populate_cpath(circ) < 0) { + /* XXX should there be a 'couldn't build a path' reason? */ circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL); return NULL; } @@ -425,7 +426,8 @@ circuit_n_conn_done(or_connection_t *or_conn, int status) * set_circid_orconn here. */ circ->n_conn = or_conn; if (CIRCUIT_IS_ORIGIN(circ)) { - if ((err_reason = circuit_send_next_onion_skin(TO_ORIGIN_CIRCUIT(circ))) < 0) { + if ((err_reason = + circuit_send_next_onion_skin(TO_ORIGIN_CIRCUIT(circ))) < 0) { log_info(LD_CIRC, "send_next_onion_skin failed; circuit marked for closing."); circuit_mark_for_close(circ, -err_reason); @@ -892,7 +894,7 @@ circuit_truncated(origin_circuit_t *circ, crypt_path_t *layer) * means that a connection broke or an extend failed. For now, * just give up. */ - circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL); + circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_OR_CONN_CLOSED); return 0; #if 0 |