diff options
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r-- | src/daemon/daemon.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 7b3ff20c..67fe978a 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -522,7 +522,10 @@ recv_param_adapter (struct MHD_Connection *connection, void *other, size_t i) | |||
522 | { | 522 | { |
523 | if (connection->socket_fd == -1) | 523 | if (connection->socket_fd == -1) |
524 | return -1; | 524 | return -1; |
525 | return RECV (connection->socket_fd, other, i, MSG_NOSIGNAL); | 525 | if (0 != (connection->daemon->options & MHD_USE_SSL)) |
526 | return RECV (connection->socket_fd, other, i, MSG_NOSIGNAL); | ||
527 | else | ||
528 | return RECV (connection->socket_fd, other, i, MSG_NOSIGNAL | MSG_DONTWAIT); | ||
526 | } | 529 | } |
527 | 530 | ||
528 | /** | 531 | /** |
@@ -539,7 +542,10 @@ send_param_adapter (struct MHD_Connection *connection, | |||
539 | { | 542 | { |
540 | if (connection->socket_fd == -1) | 543 | if (connection->socket_fd == -1) |
541 | return -1; | 544 | return -1; |
542 | return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL); | 545 | if (0 != (connection->daemon->options & MHD_USE_SSL)) |
546 | return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL); | ||
547 | else | ||
548 | return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL | MSG_DONTWAIT); | ||
543 | } | 549 | } |
544 | 550 | ||
545 | /** | 551 | /** |
@@ -991,6 +997,7 @@ MHD_start_daemon (unsigned int options, | |||
991 | return ret; | 997 | return ret; |
992 | } | 998 | } |
993 | 999 | ||
1000 | |||
994 | /** | 1001 | /** |
995 | * Start a webserver on the given port. | 1002 | * Start a webserver on the given port. |
996 | * | 1003 | * |