From 7200f079bf1b698e6e73893e9a931a464a212fb0 Mon Sep 17 00:00:00 2001 From: cpq Date: Mon, 25 Jan 2021 14:43:56 +0000 Subject: [PATCH] Remove dead code --- examples/socks5-server/main.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/examples/socks5-server/main.c b/examples/socks5-server/main.c index d0cb1b56..a8837292 100644 --- a/examples/socks5-server/main.c +++ b/examples/socks5-server/main.c @@ -89,25 +89,6 @@ static void fn2(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { (void) fn_data; } -#if 0 -static void serv_ev_handler(struct mg_connection *c, int ev, void *ev_data) { - if (ev == MG_EV_CLOSE) { - disband(c); - } else if (ev == MG_EV_RECV) { - relay_data(c); - } else if (ev == MG_EV_CONNECT) { - int res = *(int *) ev_data; - if (res != 0) LOG(LL_ERROR, ("connect error: %d", res)); - } -} - -static void mg_socks5_connect(struct mg_connection *c, const char *addr) { - struct mg_connection *serv = mg_connect(c->mgr, addr, serv_ev_handler); - serv->user_data = c; - c->user_data = serv; -} -#endif - // Request, https://www.ietf.org/rfc/rfc1928.txt paragraph 4 // +----+-----+-------+------+----------+----------+ // |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |