Commit 2436f9d6 authored by Sergey Lyubka's avatar Sergey Lyubka

squashed win32 warnings

parent 2238951c
...@@ -874,7 +874,7 @@ int ns_server_poll(struct ns_server *server, int milli) { ...@@ -874,7 +874,7 @@ int ns_server_poll(struct ns_server *server, int milli) {
if (server->ctl[1] != INVALID_SOCKET && if (server->ctl[1] != INVALID_SOCKET &&
FD_ISSET(server->ctl[1], &read_set)) { FD_ISSET(server->ctl[1], &read_set)) {
struct ctl_msg ctl_msg; struct ctl_msg ctl_msg;
int len = recv(server->ctl[1], &ctl_msg, sizeof(ctl_msg), 0); int len = recv(server->ctl[1], (char *) &ctl_msg, sizeof(ctl_msg), 0);
send(server->ctl[1], ctl_msg.message, 1, 0); send(server->ctl[1], ctl_msg.message, 1, 0);
if (len >= (int) sizeof(ctl_msg.callback) && ctl_msg.callback != NULL) { if (len >= (int) sizeof(ctl_msg.callback) && ctl_msg.callback != NULL) {
ns_iterate(server, ctl_msg.callback, ctl_msg.message); ns_iterate(server, ctl_msg.callback, ctl_msg.message);
...@@ -992,8 +992,9 @@ void ns_server_wakeup_ex(struct ns_server *server, ns_callback_t cb, ...@@ -992,8 +992,9 @@ void ns_server_wakeup_ex(struct ns_server *server, ns_callback_t cb,
len < sizeof(ctl_msg.message)) { len < sizeof(ctl_msg.message)) {
ctl_msg.callback = cb; ctl_msg.callback = cb;
memcpy(ctl_msg.message, data, len); memcpy(ctl_msg.message, data, len);
send(server->ctl[0], &ctl_msg, offsetof(struct ctl_msg, message) + len, 0); send(server->ctl[0], (char *) &ctl_msg,
recv(server->ctl[0], &len, 1, 0); offsetof(struct ctl_msg, message) + len, 0);
recv(server->ctl[0], (char *) &len, 1, 0);
} }
} }
...@@ -4252,6 +4253,10 @@ static void try_parse(struct connection *conn) { ...@@ -4252,6 +4253,10 @@ static void try_parse(struct connection *conn) {
} }
} }
static void proxy_from_client_to_target_host(struct connection *conn) {
ns_forward(conn->ns_conn, conn->endpoint.nc);
}
static void on_recv_data(struct connection *conn) { static void on_recv_data(struct connection *conn) {
struct iobuf *io = &conn->ns_conn->recv_iobuf; struct iobuf *io = &conn->ns_conn->recv_iobuf;
...@@ -4275,7 +4280,7 @@ static void on_recv_data(struct connection *conn) { ...@@ -4275,7 +4280,7 @@ static void on_recv_data(struct connection *conn) {
} }
if (conn->endpoint_type == EP_PROXY && conn->endpoint.nc != NULL) { if (conn->endpoint_type == EP_PROXY && conn->endpoint.nc != NULL) {
ns_forward(conn->ns_conn, conn->endpoint.nc); proxy_from_client_to_target_host(conn);
} }
#ifndef MONGOOSE_NO_CGI #ifndef MONGOOSE_NO_CGI
if (conn->endpoint_type == EP_CGI && conn->endpoint.nc != NULL) { if (conn->endpoint_type == EP_CGI && conn->endpoint.nc != NULL) {
......
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