aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c47
1 files changed, 2 insertions, 45 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index abcf3fa0..ef596dad 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3227,52 +3227,9 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
3227 MHD_connection_update_event_loop_info (connection); 3227 MHD_connection_update_event_loop_info (connection);
3228#ifdef EPOLL_SUPPORT 3228#ifdef EPOLL_SUPPORT
3229 if (0 != (daemon->options & MHD_USE_EPOLL)) 3229 if (0 != (daemon->options & MHD_USE_EPOLL))
3230 { 3230 return MHD_connection_epoll_update_ (connection);
3231 switch (connection->event_loop_info) 3231#endif /* EPOLL_SUPPORT */
3232 {
3233 case MHD_EVENT_LOOP_INFO_READ:
3234 if ( (0 != (connection->epoll_state & MHD_EPOLL_STATE_READ_READY)) &&
3235 (0 == (connection->epoll_state & MHD_EPOLL_STATE_SUSPENDED)) &&
3236 (0 == (connection->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) )
3237 {
3238 EDLL_insert (daemon->eready_head,
3239 daemon->eready_tail,
3240 connection);
3241 connection->epoll_state |= MHD_EPOLL_STATE_IN_EREADY_EDLL;
3242 }
3243 break;
3244 case MHD_EVENT_LOOP_INFO_WRITE:
3245 if ( (0 != (connection->epoll_state & MHD_EPOLL_STATE_WRITE_READY)) &&
3246 (0 == (connection->epoll_state & MHD_EPOLL_STATE_SUSPENDED)) &&
3247 (0 == (connection->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) )
3248 {
3249 EDLL_insert (daemon->eready_head,
3250 daemon->eready_tail,
3251 connection);
3252 connection->epoll_state |= MHD_EPOLL_STATE_IN_EREADY_EDLL;
3253 }
3254 break;
3255 case MHD_EVENT_LOOP_INFO_BLOCK:
3256 /* we should look at this connection again in the next iteration
3257 of the event loop, as we're waiting on the application */
3258 if ( (0 == (connection->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL) &&
3259 (0 == (connection->epoll_state & MHD_EPOLL_STATE_SUSPENDED))) )
3260 {
3261 EDLL_insert (daemon->eready_head,
3262 daemon->eready_tail,
3263 connection);
3264 connection->epoll_state |= MHD_EPOLL_STATE_IN_EREADY_EDLL;
3265 }
3266 break;
3267 case MHD_EVENT_LOOP_INFO_CLEANUP:
3268 /* This connection is finished, nothing left to do */
3269 break;
3270 }
3271 }
3272 return MHD_connection_epoll_update_ (connection);
3273#else
3274 return MHD_YES; 3232 return MHD_YES;
3275#endif
3276} 3233}
3277 3234
3278 3235