diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_edge.c | 6 | ||||
-rw-r--r-- | src/or/rendclient.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 2d555a499f..0197d05c31 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -163,14 +163,14 @@ connection_edge_destroy(uint16_t circ_id, edge_connection_t *conn) "CircID %d: At an edge. Marking connection for close.", circ_id); if (conn->_base.type == CONN_TYPE_AP) { connection_mark_unattached_ap(conn, END_STREAM_REASON_DESTROY); + control_event_stream_status(conn, STREAM_EVENT_CLOSED, + END_STREAM_REASON_DESTROY); + conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED; } else { /* closing the circuit, nothing to send an END to */ conn->_base.edge_has_sent_end = 1; conn->end_reason = END_STREAM_REASON_DESTROY; conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED; - if (conn->_base.type == CONN_TYPE_AP) - control_event_stream_status(conn, STREAM_EVENT_CLOSED, - END_STREAM_REASON_DESTROY); connection_mark_for_close(TO_CONN(conn)); conn->_base.hold_open_until_flushed = 1; } diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 6e92ef50b0..0346b8840b 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -543,6 +543,9 @@ rend_client_rendezvous_acked(origin_circuit_t *circ, const char *request, log_info(LD_REND,"Got rendezvous ack. This circuit is now ready for " "rendezvous."); circ->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY; + /* If we already have the introduction circuit built, make sure we send + * the INTRODUCE cell _now_ */ + connection_ap_attach_pending(); return 0; } @@ -604,7 +607,8 @@ rend_client_receive_rendezvous(origin_circuit_t *circ, const char *request, hop->deliver_window = CIRCWINDOW_START; onion_append_to_cpath(&circ->cpath, hop); - circ->build_state->pending_final_cpath = NULL; /* prevent double-free */ + circ->build_state->pending_final_cpath = NULL; /* prevent doublee-free */ + connection_ap_attach_pending(); return 0; err: circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL); |