aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-03-15 10:03:17 +0000
committerChristian Grothoff <christian@grothoff.org>2011-03-15 10:03:17 +0000
commit8ba95f2eb5ace15d9c047e2a6d100b0bc1feeb92 (patch)
tree2139b4ecff4101cf74afff3eaa8086f3092f4535
parentcd8920a28dbdc0eeb2c58bacd80b7a215baecbd4 (diff)
downloadlibmicrohttpd-8ba95f2eb5ace15d9c047e2a6d100b0bc1feeb92.tar.gz
libmicrohttpd-8ba95f2eb5ace15d9c047e2a6d100b0bc1feeb92.zip
simplify
-rw-r--r--src/daemon/daemon.c23
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);