mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r8972@totoro: nickm | 2006-10-09 10:36:22 -0400
Patch from Mike Perry: add a REASON field to closed and failed circ events. svn:r8671
This commit is contained in:
+6
-5
@@ -273,18 +273,19 @@ command_process_created_cell(cell_t *cell, or_connection_t *conn)
|
||||
|
||||
if (CIRCUIT_IS_ORIGIN(circ)) { /* we're the OP. Handshake this. */
|
||||
origin_circuit_t *origin_circ = TO_ORIGIN_CIRCUIT(circ);
|
||||
int err_reason = 0;
|
||||
log_debug(LD_OR,"at OP. Finishing handshake.");
|
||||
if (circuit_finish_handshake(origin_circ, cell->command,
|
||||
cell->payload) < 0) {
|
||||
if ((err_reason = circuit_finish_handshake(origin_circ, cell->command,
|
||||
cell->payload)) < 0) {
|
||||
log_warn(LD_OR,"circuit_finish_handshake failed.");
|
||||
circuit_mark_for_close(circ, END_CIRC_AT_ORIGIN);
|
||||
circuit_mark_for_close(circ, -err_reason);
|
||||
return;
|
||||
}
|
||||
log_debug(LD_OR,"Moving to next skin.");
|
||||
if (circuit_send_next_onion_skin(origin_circ) < 0) {
|
||||
if ((err_reason = circuit_send_next_onion_skin(origin_circ)) < 0) {
|
||||
log_info(LD_OR,"circuit_send_next_onion_skin failed.");
|
||||
/* XXX push this circuit_close lower */
|
||||
circuit_mark_for_close(circ, END_CIRC_AT_ORIGIN);
|
||||
circuit_mark_for_close(circ, -err_reason);
|
||||
return;
|
||||
}
|
||||
} else { /* pack it into an extended relay cell, and send it. */
|
||||
|
||||
Reference in New Issue
Block a user