diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-08-04 09:30:53 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-27 12:29:42 -0400 |
commit | 73feedb8b323e71124382708b6787ab1fdec25b9 (patch) | |
tree | 5092e60266a27917ca2312bcb7e7c38765e21813 | |
parent | c6e22ae2b747681b86b6c00c1fe8438f2b4a8e0f (diff) | |
download | tor-73feedb8b323e71124382708b6787ab1fdec25b9.tar tor-73feedb8b323e71124382708b6787ab1fdec25b9.tar.gz |
Have edge connections use fetch_from_evbuffer_socks when appropriate.
-rw-r--r-- | src/or/connection_edge.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 03aded388..1488f5a89 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1895,8 +1895,14 @@ connection_ap_handshake_process_socks(edge_connection_t *conn) log_debug(LD_APP,"entered."); - sockshere = fetch_from_buf_socks(conn->_base.inbuf, socks, - options->TestSocks, options->SafeSocks); + IF_HAS_BUFFEREVENT(TO_CONN(conn), { + struct evbuffer *input = bufferevent_get_input(conn->_base.bufev); + sockshere = fetch_from_evbuffer_socks(input, socks, + options->TestSocks, options->SafeSocks); + }) ELSE_IF_NO_BUFFEREVENT { + sockshere = fetch_from_buf_socks(conn->_base.inbuf, socks, + options->TestSocks, options->SafeSocks); + }; if (sockshere == 0) { if (socks->replylen) { connection_write_to_buf(socks->reply, socks->replylen, TO_CONN(conn)); |