Have edge connections use fetch_from_evbuffer_socks when appropriate.

This commit is contained in:
Nick Mathewson 2009-08-04 09:30:53 -07:00
parent c6e22ae2b7
commit 73feedb8b3

View File

@ -1895,8 +1895,14 @@ connection_ap_handshake_process_socks(edge_connection_t *conn)
log_debug(LD_APP,"entered.");
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));