diff options
author | Roger Dingledine <arma@torproject.org> | 2004-06-17 21:11:09 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-06-17 21:11:09 +0000 |
commit | 207fcb35d1123cc918b8787e55e3a7e5d60aa0c5 (patch) | |
tree | f64ca31161d0cf36af9ecbaf848acf06a5cb9f7c /src/or/connection_edge.c | |
parent | 22c5ddb588150fb85d5a98d8e6f5e56c0bcb3f67 (diff) | |
download | tor-207fcb35d1123cc918b8787e55e3a7e5d60aa0c5.tar tor-207fcb35d1123cc918b8787e55e3a7e5d60aa0c5.tar.gz |
tweaks and bugfix on resolve/resolved code
svn:r1980
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 20a9341a8..15dbe9a28 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -372,13 +372,15 @@ static int connection_ap_handshake_process_socks(connection_t *conn) { } /* else socks handshake is done, continue processing */ if (socks->command == SOCKS_COMMAND_RESOLVE) { + uint32_t answer; /* Reply to resolves immediately if we can. */ if (strlen(socks->address) > RELAY_PAYLOAD_SIZE) { connection_ap_handshake_socks_resolved(conn,RESOLVED_TYPE_ERROR,0,NULL); conn->socks_request->has_finished = 1; connection_mark_for_close(conn); + return 0; } - uint32_t answer = htonl(client_dns_lookup_entry(socks->address)); + answer = htonl(client_dns_lookup_entry(socks->address)); if (answer) { connection_ap_handshake_socks_resolved(conn,RESOLVED_TYPE_IPV4,4, (char*)&answer); |