aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-08-11 15:03:43 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-27 12:31:13 -0400
commitb63f6518cbdc4c80b09399bc17d3bec3cac76ad9 (patch)
tree5e280f817c5f077a00682ae0f0d5be9cb55cd37d /src/or/connection.c
parentddcb59bb70457e203247931aaad3a3ff8b923f97 (diff)
downloadtor-b63f6518cbdc4c80b09399bc17d3bec3cac76ad9.tar.gz
tor-b63f6518cbdc4c80b09399bc17d3bec3cac76ad9.zip
Add bufferevent support for outgoing connections; exits are now supported.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index e6b4bc3d18..394aa3b836 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -192,6 +192,8 @@ connection_type_uses_bufferevent(connection_t *conn)
switch (conn->type) {
case CONN_TYPE_AP:
return 1;
+ case CONN_TYPE_EXIT:
+ return 1;
default:
return 0;
}
@@ -1342,7 +1344,7 @@ connection_connect(connection_t *conn, const char *address,
escaped_safe_str_client(address),
port, inprogress?"in progress":"established", s);
conn->s = s;
- if (connection_add(conn) < 0) /* no space, forget it */
+ if (connection_add_connecting(conn) < 0) /* no space, forget it */
return -1;
return inprogress ? 0 : 1;
}