From a579f0de61a2a0142bde5a94060bbe1a5f76b21e Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 22 Mar 2019 18:01:50 +0100 Subject: [PATCH] Make sure that information is read --- src/socks5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/socks5.c b/src/socks5.c index 02a6a34..277bfdf 100644 --- a/src/socks5.c +++ b/src/socks5.c @@ -15,8 +15,6 @@ struct socks5_ctx { uint8_t sr_host_read; }; -int on_socks5_send_handshake(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo); - void socks5_free_ctx(void* elem) { struct socks5_ctx* ctx = elem; free(ctx); @@ -100,6 +98,7 @@ int on_socks5_send_handshake(struct evt_core_ctx* ctx, struct evt_core_fdinfo* f if (s5ctx->ch_cursor < s5ctx->ch_size) return 0; evt_core_mv_fd2(ctx, fdinfo, "socks5-recv-handshake"); + fdinfo->cat->cb(ctx, fdinfo); return 1; } @@ -148,6 +147,7 @@ int on_socks5_send_client_req(struct evt_core_ctx* ctx, struct evt_core_fdinfo* if (s5ctx->cr_cursor < s5ctx->cr_size) return 0; evt_core_mv_fd2 (ctx, fdinfo, "socks5-recv-server-reply"); + fdinfo->cat->cb(ctx, fdinfo); return 1; }