Commit 9b24fdfd authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Reformat mongoose

PUBLISHED_FROM=5202fa46a6a834bde35168ba566d3dce7c48f453
parent 8313896a
...@@ -3266,9 +3266,9 @@ extern const struct mg_iface_vtable mg_socks_iface_vtable; ...@@ -3266,9 +3266,9 @@ extern const struct mg_iface_vtable mg_socks_iface_vtable;
extern const struct mg_iface_vtable mg_default_iface_vtable; extern const struct mg_iface_vtable mg_default_iface_vtable;
const struct mg_iface_vtable *mg_ifaces[] = { const struct mg_iface_vtable *mg_ifaces[] = {
&mg_default_iface_vtable, &mg_default_iface_vtable,
#if MG_ENABLE_TUN #if MG_ENABLE_TUN
&mg_tun_iface_vtable, &mg_tun_iface_vtable,
#endif #endif
}; };
...@@ -12833,7 +12833,7 @@ static void mg_socks5_handshake(struct mg_connection *c) { ...@@ -12833,7 +12833,7 @@ static void mg_socks5_handshake(struct mg_connection *c) {
} }
mbuf_remove(r, 2 + r->buf[1]); mbuf_remove(r, 2 + r->buf[1]);
mg_send(c, reply, sizeof(reply)); mg_send(c, reply, sizeof(reply));
c->flags |= MG_F_USER_1; /* Mark handshake done */ c->flags |= MG_F_USER_1; /* Mark handshake done */
} }
} }
...@@ -12863,7 +12863,7 @@ static void serv_ev_handler(struct mg_connection *c, int ev, void *ev_data) { ...@@ -12863,7 +12863,7 @@ static void serv_ev_handler(struct mg_connection *c, int ev, void *ev_data) {
} else if (ev == MG_EV_RECV) { } else if (ev == MG_EV_RECV) {
relay_data(c); relay_data(c);
} else if (ev == MG_EV_CONNECT) { } else if (ev == MG_EV_CONNECT) {
int res = * (int *) ev_data; int res = *(int *) ev_data;
if (res != 0) LOG(LL_ERROR, ("connect error: %d", res)); if (res != 0) LOG(LL_ERROR, ("connect error: %d", res));
} }
} }
......
...@@ -6061,16 +6061,16 @@ enum mg_socks_handshake_method { ...@@ -6061,16 +6061,16 @@ enum mg_socks_handshake_method {
/* SOCKS5 commands */ /* SOCKS5 commands */
enum mg_socks_command { enum mg_socks_command {
MG_SOCKS_CMD_CONNECT = 1, /* Command: CONNECT */ MG_SOCKS_CMD_CONNECT = 1, /* Command: CONNECT */
MG_SOCKS_CMD_BIND = 2, /* Command: BIND */ MG_SOCKS_CMD_BIND = 2, /* Command: BIND */
MG_SOCKS_CMD_UDP_ASSOCIATE = 3, /* Command: UDP ASSOCIATE */ MG_SOCKS_CMD_UDP_ASSOCIATE = 3, /* Command: UDP ASSOCIATE */
}; };
/* SOCKS5 address types */ /* SOCKS5 address types */
enum mg_socks_address_type { enum mg_socks_address_type {
MG_SOCKS_ADDR_IPV4 = 1, /* Address type: IPv4 */ MG_SOCKS_ADDR_IPV4 = 1, /* Address type: IPv4 */
MG_SOCKS_ADDR_DOMAIN = 3, /* Address type: Domain name */ MG_SOCKS_ADDR_DOMAIN = 3, /* Address type: Domain name */
MG_SOCKS_ADDR_IPV6 = 4, /* Address type: IPv6 */ MG_SOCKS_ADDR_IPV6 = 4, /* Address type: IPv6 */
}; };
/* SOCKS5 response codes */ /* SOCKS5 response codes */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment