mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Have edge connections use fetch_from_evbuffer_socks when appropriate.
This commit is contained in:
parent
c6e22ae2b7
commit
73feedb8b3
@ -1895,8 +1895,14 @@ connection_ap_handshake_process_socks(edge_connection_t *conn)
|
|||||||
|
|
||||||
log_debug(LD_APP,"entered.");
|
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,
|
sockshere = fetch_from_buf_socks(conn->_base.inbuf, socks,
|
||||||
options->TestSocks, options->SafeSocks);
|
options->TestSocks, options->SafeSocks);
|
||||||
|
};
|
||||||
if (sockshere == 0) {
|
if (sockshere == 0) {
|
||||||
if (socks->replylen) {
|
if (socks->replylen) {
|
||||||
connection_write_to_buf(socks->reply, socks->replylen, TO_CONN(conn));
|
connection_write_to_buf(socks->reply, socks->replylen, TO_CONN(conn));
|
||||||
|
Loading…
Reference in New Issue
Block a user