aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-03 00:13:41 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-03 00:13:41 -0400
commit6053e11ee6540750a68a7c59a1b91727f7e10952 (patch)
treeec4893214c3552adb9f6203deb80be9a41e6f0d1 /src/or/connection.h
parent72125389979af60b659dc469159ea9be397a2ffa (diff)
downloadtor-6053e11ee6540750a68a7c59a1b91727f7e10952.tar.gz
tor-6053e11ee6540750a68a7c59a1b91727f7e10952.zip
Refactor the interfaces of transport/proxy lookup fns
Returning a tristate is needless here; we can just use the yielded transport/proxy_type field to tell whether there's a proxy, and have the return indicate success/failure. Also, store the proxy_type in the or_connection_t rather than letting it get out of sync if a configuration reload happens between launching the or_connection and deciding what to say with it.
Diffstat (limited to 'src/or/connection.h')
-rw-r--r--src/or/connection.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.h b/src/or/connection.h
index bf439b9bbc..be3de88aaa 100644
--- a/src/or/connection.h
+++ b/src/or/connection.h
@@ -58,8 +58,8 @@ int connection_connect(connection_t *conn, const char *address,
int connection_proxy_connect(connection_t *conn, int type);
int connection_read_proxy_handshake(connection_t *conn);
void log_failed_proxy_connection(connection_t *conn);
-int get_proxy_addrport(tor_addr_t *addr,
- uint16_t *port, connection_t *conn);
+int get_proxy_addrport(tor_addr_t *addr, uint16_t *port, int *proxy_type,
+ const connection_t *conn);
int retry_all_listeners(smartlist_t *replaced_conns,
smartlist_t *new_conns);