diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-09-05 22:09:44 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-09-05 22:09:44 +0000 |
commit | baeb260ad18842118f3574ab7ad73fb78c6a4b43 (patch) | |
tree | 4420e9b557fe6322c2d1ffe8ebe370c94405241b /src/or/connection_edge.c | |
parent | cd5d0f389045af1aefce305065b1da16dc4a94af (diff) | |
download | tor-baeb260ad18842118f3574ab7ad73fb78c6a4b43.tar.gz tor-baeb260ad18842118f3574ab7ad73fb78c6a4b43.zip |
Refactor use of connection_new so that we get more verifiable typesafety.
svn:r16785
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 2dc083291a..f799090de1 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -2167,7 +2167,7 @@ connection_ap_make_link(char *address, uint16_t port, log_info(LD_APP,"Making internal %s tunnel to %s:%d ...", want_onehop ? "direct" : "anonymized" , safe_str(address),port); - conn = TO_EDGE_CONN(connection_new(CONN_TYPE_AP, AF_INET)); + conn = edge_connection_new(CONN_TYPE_AP, AF_INET); conn->_base.linked = 1; /* so that we can add it safely below. */ /* populate conn->socks_request */ @@ -2517,7 +2517,7 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ) } log_debug(LD_EXIT,"Creating new exit connection."); - n_stream = TO_EDGE_CONN(connection_new(CONN_TYPE_EXIT, AF_INET)); + n_stream = edge_connection_new(CONN_TYPE_EXIT, AF_INET); n_stream->_base.purpose = EXIT_PURPOSE_CONNECT; n_stream->stream_id = rh.stream_id; @@ -2623,7 +2623,7 @@ connection_exit_begin_resolve(cell_t *cell, or_circuit_t *circ) * resolved; but if we didn't store them in a connection like this, * the housekeeping in dns.c would get way more complicated.) */ - dummy_conn = TO_EDGE_CONN(connection_new(CONN_TYPE_EXIT, AF_INET)); + dummy_conn = edge_connection_new(CONN_TYPE_EXIT, AF_INET); dummy_conn->stream_id = rh.stream_id; dummy_conn->_base.address = tor_strndup(cell->payload+RELAY_HEADER_SIZE, rh.length); @@ -2765,7 +2765,7 @@ connection_exit_connect_dir(edge_connection_t *exitconn) exitconn->_base.state = EXIT_CONN_STATE_OPEN; - dirconn = TO_DIR_CONN(connection_new(CONN_TYPE_DIR, AF_INET)); + dirconn = dir_connection_new(AF_INET); dirconn->_base.addr = exitconn->_base.addr; dirconn->_base.port = 0; |