aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-06-21 18:48:43 +0200
committerGeorge Kadianakis <desnacked@gmail.com>2011-06-21 18:48:43 +0200
commit298f1700367f4d17cf376ea09442b23e7f16229b (patch)
treedaca009ed4b5b7fdc4642df8f0c26d8b3bda6942 /src/or/connection_or.c
parent392e947df5db1d2cdd0cbd0d63226f734dfd7267 (diff)
downloadtor-298f1700367f4d17cf376ea09442b23e7f16229b.tar
tor-298f1700367f4d17cf376ea09442b23e7f16229b.tar.gz
Tweaked connection{.c,.h,_or.c} based on nick's comments.
* Tweaked doxygen comments. * Changed returns of get_proxy_addrport(). * Ran make check-spaces. * Various small code tweaks.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 4ed4723fe..6ed6fe65b 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -336,7 +336,7 @@ connection_or_finished_connecting(or_connection_t *or_conn)
else if (get_options()->Socks5Proxy)
proxy_type = PROXY_SOCKS5;
else if (get_options()->ClientTransportPlugin) {
- transport_info_t *transport;
+ transport_t *transport;
transport = find_transport_by_bridge_addrport(&conn->addr,conn->port);
if (transport) { /* this bridge supports transports. use proxy. */
log_debug(LD_GENERAL, "Found transport. Setting proxy type!\n");
@@ -863,13 +863,10 @@ connection_or_connect(const tor_addr_t *_addr, uint16_t port,
/* If we are using a proxy server, find it and use it. */
proxy_type = get_proxy_type();
r = get_proxy_addrport(proxy_type, &proxy_addr, &proxy_port, TO_CONN(conn));
- if (r == 1) { /* proxy found. */
- addr = proxy_addr;
+ if (r == 0) { /* proxy found. */
+ tor_addr_copy(&addr, &proxy_addr);
port = proxy_port;
conn->_base.proxy_state = PROXY_INFANT;
- } else if (r < 0) {
- log_info(LD_PROTOCOL, "Failed on getting proxy addrport.");
- return NULL;
}
switch (connection_connect(TO_CONN(conn), conn->_base.address,