summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-20 17:54:36 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-20 17:54:36 +0000
commit12af87539b3380e97a9433930e4fa60cd825c157 (patch)
tree20117d0755a39f369a7c7bcc38a39d2c0c84ba1a /src/or/connection_edge.c
parentc8c36dd227eec2454cfe3aaa74720cc5897864ac (diff)
downloadtor-12af87539b3380e97a9433930e4fa60cd825c157.tar.gz
tor-12af87539b3380e97a9433930e4fa60cd825c157.zip
r9303@Kushana: nickm | 2006-10-20 12:07:34 -0400
Start implementing reason extension for stream events to match the one one used by circuit events. (Not a complete implementation yet; actual reasons are not passed to control.c) svn:r8777
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index ad88e4153e..5a415bb04f 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -498,7 +498,8 @@ circuit_discard_optional_exit_enclaves(extend_info_t *info)
int
connection_ap_detach_retriable(edge_connection_t *conn, origin_circuit_t *circ)
{
- control_event_stream_status(conn, STREAM_EVENT_FAILED_RETRIABLE);
+ control_event_stream_status(conn, STREAM_EVENT_FAILED_RETRIABLE,
+ END_STREAM_REASON_FIXME_XXXX);
conn->_base.timestamp_lastread = time(NULL);
if (! get_options()->LeaveStreamsUnattached) {
conn->_base.state = AP_CONN_STATE_CIRCUIT_WAIT;
@@ -1436,9 +1437,9 @@ connection_ap_handshake_process_socks(edge_connection_t *conn)
} /* else socks handshake is done, continue processing */
if (socks->command == SOCKS_COMMAND_CONNECT)
- control_event_stream_status(conn, STREAM_EVENT_NEW);
+ control_event_stream_status(conn, STREAM_EVENT_NEW, 0);
else
- control_event_stream_status(conn, STREAM_EVENT_NEW_RESOLVE);
+ control_event_stream_status(conn, STREAM_EVENT_NEW_RESOLVE, 0);
if (options->LeaveStreamsUnattached) {
conn->_base.state = AP_CONN_STATE_CONTROLLER_WAIT;
@@ -1480,7 +1481,7 @@ connection_ap_process_transparent(edge_connection_t *conn)
}
/* we have the original destination */
- control_event_stream_status(conn, STREAM_EVENT_NEW);
+ control_event_stream_status(conn, STREAM_EVENT_NEW, 0);
if (options->LeaveStreamsUnattached) {
conn->_base.state = AP_CONN_STATE_CONTROLLER_WAIT;
@@ -1557,7 +1558,7 @@ connection_ap_handshake_send_begin(edge_connection_t *ap_conn,
ap_conn->_base.state = AP_CONN_STATE_CONNECT_WAIT;
log_info(LD_APP,"Address/port sent, ap socket %d, n_circ_id %d",
ap_conn->_base.s, circ->_base.n_circ_id);
- control_event_stream_status(ap_conn, STREAM_EVENT_SENT_CONNECT);
+ control_event_stream_status(ap_conn, STREAM_EVENT_SENT_CONNECT, 0);
return 0;
}
@@ -1623,7 +1624,7 @@ connection_ap_handshake_send_resolve(edge_connection_t *ap_conn,
ap_conn->_base.state = AP_CONN_STATE_RESOLVE_WAIT;
log_info(LD_APP,"Address sent for resolve, ap socket %d, n_circ_id %d",
ap_conn->_base.s, circ->_base.n_circ_id);
- control_event_stream_status(ap_conn, STREAM_EVENT_SENT_RESOLVE);
+ control_event_stream_status(ap_conn, STREAM_EVENT_SENT_RESOLVE, 0);
return 0;
}
@@ -1781,7 +1782,8 @@ connection_ap_handshake_socks_reply(edge_connection_t *conn, char *reply,
tor_assert(conn->socks_request); /* make sure it's an AP stream */
control_event_stream_status(conn,
- status==SOCKS5_SUCCEEDED ? STREAM_EVENT_SUCCEEDED : STREAM_EVENT_FAILED);
+ status==SOCKS5_SUCCEEDED ? STREAM_EVENT_SUCCEEDED : STREAM_EVENT_FAILED,
+ END_STREAM_REASON_FIXME_XXXX);
if (conn->socks_request->has_finished) {
log_warn(LD_BUG, "Harmless bug: duplicate calls to "