Commit c88b7b19 authored by Sergey Lyubka's avatar Sergey Lyubka

Squashed warning on Windows, using INVALID_SOCKET

parent 4fbfb5d0
...@@ -852,7 +852,7 @@ static void open_cgi_endpoint(struct connection *conn, const char *prog) { ...@@ -852,7 +852,7 @@ static void open_cgi_endpoint(struct connection *conn, const char *prog) {
// TODO(lsm): use sigaction to restart interrupted syscall // TODO(lsm): use sigaction to restart interrupted syscall
do { do {
mg_socketpair(fds); mg_socketpair(fds);
} while (fds[0] < 0); } while (fds[0] == INVALID_SOCKET);
if (start_process(conn->server->config_options[CGI_INTERPRETER], if (start_process(conn->server->config_options[CGI_INTERPRETER],
prog, blk.buf, blk.vars, dir, fds[1]) > 0) { prog, blk.buf, blk.vars, dir, fds[1]) > 0) {
...@@ -3603,7 +3603,7 @@ struct mg_server *mg_create_server(void *server_data) { ...@@ -3603,7 +3603,7 @@ struct mg_server *mg_create_server(void *server_data) {
// interrupted syscalls in mg_socketpair(). // interrupted syscalls in mg_socketpair().
do { do {
mg_socketpair(server->ctl); mg_socketpair(server->ctl);
} while (server->ctl[0] < 0); } while (server->ctl[0] == INVALID_SOCKET);
server->server_data = server_data; server->server_data = server_data;
server->listening_sock = INVALID_SOCKET; server->listening_sock = INVALID_SOCKET;
......
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