diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-03 01:47:39 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-03 01:47:39 +0000 |
commit | bcbff6dcd753a627eb7e78658501443a0da5c3c9 (patch) | |
tree | fee8395227a58a65e13974fac2c4b850b4693687 /src/or/connection_edge.c | |
parent | 78c01a95b51e9b410637e4a776422db7d581553c (diff) | |
download | tor-bcbff6dcd753a627eb7e78658501443a0da5c3c9.tar.gz tor-bcbff6dcd753a627eb7e78658501443a0da5c3c9.zip |
Note to self: htonl(htonl(X)) is *not* "twice as good as htonl(X)". Spotted by arma.
svn:r4900
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index e6d3705df6..d7ae338dab 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -290,7 +290,7 @@ connection_edge_finished_connecting(connection_t *conn) return 0; /* circuit is closed, don't continue */ } else { char connected_payload[8]; - set_uint32(connected_payload, htonl(htonl(conn->addr))); + set_uint32(connected_payload, htonl(conn->addr)); set_uint32(connected_payload+4, htonl(MAX_DNS_ENTRY_AGE)); /* XXXX fill with a real TTL */ if (connection_edge_send_command(conn, circuit_get_by_edge_conn(conn), @@ -1659,7 +1659,7 @@ connection_exit_connect(connection_t *conn) } else { /* normal stream */ /* This must be the original address, not the redirected address. */ char connected_payload[8]; - set_uint32(connected_payload, htonl(htonl(conn->addr))); + set_uint32(connected_payload, htonl(conn->addr)); set_uint32(connected_payload+4, htonl(MAX_DNS_ENTRY_AGE)); /* XXXX fill with a real TTL */ connection_edge_send_command(conn, circuit_get_by_edge_conn(conn), |