aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-19 21:17:29 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-19 21:17:29 +0000
commitced72bc239834da12bbd5faaf5812967b7c1fcfa (patch)
treedb8b96417324f32435c3386b8f7f401dd89ee493 /src/daemon/daemon.c
parentc9320b2dbf64b81848bf40822681480657f1fafc (diff)
downloadlibmicrohttpd-ced72bc239834da12bbd5faaf5812967b7c1fcfa.tar.gz
libmicrohttpd-ced72bc239834da12bbd5faaf5812967b7c1fcfa.zip
hopefully fixing #1967
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r--src/daemon/daemon.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index e09fdbc9..6b47c1fc 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -944,9 +944,18 @@ MHD_add_connection (struct MHD_Daemon *daemon,
944 MHD_set_http_callbacks_ (connection); 944 MHD_set_http_callbacks_ (connection);
945 connection->recv_cls = &recv_param_adapter; 945 connection->recv_cls = &recv_param_adapter;
946 connection->send_cls = &send_param_adapter; 946 connection->send_cls = &send_param_adapter;
947#if LINUX 947 /* non-blocking sockets are required on most systems and for GNUtls;
948 however, they somehow cause serious problems on CYGWIN (#1824) */
949#ifdef CYGWIN
950 if
951#if HTTPS_SUPPORT
952 (0 != (daemon->options & MHD_USE_SSL))
953#else
954 (0)
955#endif
956#endif
948 { 957 {
949 /* non-blocking sockets perform better on Linux */ 958 /* make socket non-blocking */
950 int flags = fcntl (connection->socket_fd, F_GETFL); 959 int flags = fcntl (connection->socket_fd, F_GETFL);
951 if ( (flags == -1) || 960 if ( (flags == -1) ||
952 (0 != fcntl (connection->socket_fd, F_SETFL, flags | O_NONBLOCK)) ) 961 (0 != fcntl (connection->socket_fd, F_SETFL, flags | O_NONBLOCK)) )
@@ -957,7 +966,6 @@ MHD_add_connection (struct MHD_Daemon *daemon,
957#endif 966#endif
958 } 967 }
959 } 968 }
960#endif
961 969
962#if HTTPS_SUPPORT 970#if HTTPS_SUPPORT
963 if (0 != (daemon->options & MHD_USE_SSL)) 971 if (0 != (daemon->options & MHD_USE_SSL))