diff options
author | Roger Dingledine <arma@torproject.org> | 2002-08-24 07:55:49 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2002-08-24 07:55:49 +0000 |
commit | b8b8ab2fd6753c3f8b1e20e43047e29b5e44aea1 (patch) | |
tree | 2e72985b0977fbd95ca50020c334c8ca35d86ee8 /src/or/connection_exit.c | |
parent | c040bbe053b53ed368a4fe2836ca401c87845090 (diff) | |
download | tor-b8b8ab2fd6753c3f8b1e20e43047e29b5e44aea1.tar tor-b8b8ab2fd6753c3f8b1e20e43047e29b5e44aea1.tar.gz |
port is now kept in host order except in sin_port
svn:r82
Diffstat (limited to 'src/or/connection_exit.c')
-rw-r--r-- | src/or/connection_exit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/connection_exit.c b/src/or/connection_exit.c index c2ebca567..cbae5512e 100644 --- a/src/or/connection_exit.c +++ b/src/or/connection_exit.c @@ -47,7 +47,7 @@ int connection_exit_finished_flushing(connection_t *conn) { /* the connect has finished. */ log(LOG_DEBUG,"connection_exit_finished_flushing() : Connection to %s:%u established.", - conn->address,ntohs(conn->port)); + conn->address,conn->port); conn->state = EXIT_CONN_STATE_OPEN; if(connection_wants_to_flush(conn)) /* in case there are any queued data cells */ @@ -125,10 +125,10 @@ int connection_exit_process_data_cell(cell_t *cell, connection_t *conn) { memset((void *)&dest_addr,0,sizeof(dest_addr)); dest_addr.sin_family = AF_INET; - dest_addr.sin_port = conn->port; + dest_addr.sin_port = htons(conn->port); memcpy((void *)&dest_addr.sin_addr, &conn->addr, sizeof(uint32_t)); - log(LOG_DEBUG,"connection_exit_process_data_cell(): Connecting to %s:%u.",conn->address,ntohs(conn->port)); + log(LOG_DEBUG,"connection_exit_process_data_cell(): Connecting to %s:%u.",conn->address,conn->port); if(connect(s,(struct sockaddr *)&dest_addr,sizeof(dest_addr)) < 0){ if(errno != EINPROGRESS){ @@ -148,7 +148,7 @@ int connection_exit_process_data_cell(cell_t *cell, connection_t *conn) { } /* it succeeded. we're connected. */ - log(LOG_DEBUG,"connection_exit_process_data_cell(): Connection to %s:%u established.",conn->address,ntohs(conn->port)); + log(LOG_DEBUG,"connection_exit_process_data_cell(): Connection to %s:%u established.",conn->address,conn->port); conn->s = s; connection_set_poll_socket(conn); |