diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 0261c228..01a5b6d4 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -796,7 +796,6 @@ MHD_handle_connection (void *data) | |||
796 | struct pollfd p[1]; | 796 | struct pollfd p[1]; |
797 | #endif | 797 | #endif |
798 | 798 | ||
799 | |||
800 | timeout = con->daemon->connection_timeout; | 799 | timeout = con->daemon->connection_timeout; |
801 | while ( (MHD_YES != con->daemon->shutdown) && | 800 | while ( (MHD_YES != con->daemon->shutdown) && |
802 | (MHD_CONNECTION_CLOSED != con->state) ) | 801 | (MHD_CONNECTION_CLOSED != con->state) ) |
@@ -831,19 +830,23 @@ MHD_handle_connection (void *data) | |||
831 | switch (con->event_loop_info) | 830 | switch (con->event_loop_info) |
832 | { | 831 | { |
833 | case MHD_EVENT_LOOP_INFO_READ: | 832 | case MHD_EVENT_LOOP_INFO_READ: |
834 | if (MHD_YES != add_to_fd_set (con->socket_fd, &rs, &max, FD_SETSIZE)) | 833 | if (MHD_YES != |
834 | add_to_fd_set (con->socket_fd, &rs, &max, FD_SETSIZE)) | ||
835 | err_state = 1; | 835 | err_state = 1; |
836 | break; | 836 | break; |
837 | case MHD_EVENT_LOOP_INFO_WRITE: | 837 | case MHD_EVENT_LOOP_INFO_WRITE: |
838 | if (MHD_YES != add_to_fd_set (con->socket_fd, &ws, &max, FD_SETSIZE)) | 838 | if (MHD_YES != |
839 | add_to_fd_set (con->socket_fd, &ws, &max, FD_SETSIZE)) | ||
839 | err_state = 1; | 840 | err_state = 1; |
840 | if (con->read_buffer_size > con->read_buffer_offset && | 841 | if ( (con->read_buffer_size > con->read_buffer_offset) && |
841 | MHD_YES != add_to_fd_set (con->socket_fd, &rs, &max, FD_SETSIZE)) | 842 | (MHD_YES != |
843 | add_to_fd_set (con->socket_fd, &rs, &max, FD_SETSIZE)) ) | ||
842 | err_state = 1; | 844 | err_state = 1; |
843 | break; | 845 | break; |
844 | case MHD_EVENT_LOOP_INFO_BLOCK: | 846 | case MHD_EVENT_LOOP_INFO_BLOCK: |
845 | if (con->read_buffer_size > con->read_buffer_offset && | 847 | if ( (con->read_buffer_size > con->read_buffer_offset) && |
846 | MHD_YES != add_to_fd_set (con->socket_fd, &rs, &max, FD_SETSIZE)) | 848 | (MHD_YES != |
849 | add_to_fd_set (con->socket_fd, &rs, &max, FD_SETSIZE)) ) | ||
847 | err_state = 1; | 850 | err_state = 1; |
848 | tv.tv_sec = 0; | 851 | tv.tv_sec = 0; |
849 | tv.tv_usec = 0; | 852 | tv.tv_usec = 0; |
@@ -920,7 +923,8 @@ MHD_handle_connection (void *data) | |||
920 | if (EINTR == MHD_socket_errno_) | 923 | if (EINTR == MHD_socket_errno_) |
921 | continue; | 924 | continue; |
922 | #if HAVE_MESSAGES | 925 | #if HAVE_MESSAGES |
923 | MHD_DLOG (con->daemon, "Error during poll: `%s'\n", | 926 | MHD_DLOG (con->daemon, |
927 | "Error during poll: `%s'\n", | ||
924 | MHD_socket_last_strerr_ ()); | 928 | MHD_socket_last_strerr_ ()); |
925 | #endif | 929 | #endif |
926 | break; | 930 | break; |