diff options
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r-- | src/daemon/daemon.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 23836168..3dce3942 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -755,19 +755,16 @@ send_param_adapter (struct MHD_Connection *connection, | |||
755 | left); | 755 | left); |
756 | if (ret != -1) | 756 | if (ret != -1) |
757 | return ret; | 757 | return ret; |
758 | if (ret == -1) | 758 | if (EINTR == errno) |
759 | { | 759 | return 0; |
760 | if (EINTR == errno) | 760 | if ( (EINVAL == errno) || |
761 | return 0; | 761 | (EBADF == errno) || |
762 | if ( (EINVAL == errno) || | 762 | (EAGAIN == errno) ) |
763 | (EBADF == errno) || | 763 | return -1; |
764 | (EAGAIN == errno) ) | 764 | /* None of the 'usual' sendfile errors occurred, so we should try |
765 | return -1; | 765 | to fall back to 'SEND'; see also this thread for info on |
766 | /* None of the 'usual' sendfile errors occurred, so we should try | 766 | odd libc/Linux behavior with sendfile: |
767 | to fall back to 'SEND'; see also this thread for info on | 767 | http://lists.gnu.org/archive/html/libmicrohttpd/2011-02/msg00015.html */ |
768 | odd libc/Linux behavior with sendfile: | ||
769 | http://lists.gnu.org/archive/html/libmicrohttpd/2011-02/msg00015.html */ | ||
770 | } | ||
771 | } | 768 | } |
772 | #endif | 769 | #endif |
773 | return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL | MSG_DONTWAIT); | 770 | return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL | MSG_DONTWAIT); |