diff src/event/modules/ngx_kqueue_module.c @ 144:ef8c87afcfc5

nginx-0.0.1-2003-10-12-20:49:16 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 12 Oct 2003 16:49:16 +0000
parents ac69ab96328d
children 88abd07d9f62
line wrap: on
line diff
--- a/src/event/modules/ngx_kqueue_module.c
+++ b/src/event/modules/ngx_kqueue_module.c
@@ -151,10 +151,9 @@ ngx_log_debug(cycle->log, "EV: %d" _ kcf
 
     ngx_event_actions = ngx_kqueue_module_ctx.actions;
 
-    ngx_event_flags = NGX_HAVE_LEVEL_EVENT
-                     |NGX_HAVE_ONESHOT_EVENT
+    ngx_event_flags = NGX_USE_ONESHOT_EVENT
 #if (HAVE_CLEAR_EVENT)
-                     |NGX_HAVE_CLEAR_EVENT
+                     |NGX_USE_CLEAR_EVENT
 #else
                      |NGX_USE_LEVEL_EVENT
 #endif
@@ -238,9 +237,11 @@ static int ngx_kqueue_del_event(ngx_even
         return NGX_OK;
     }
 
-    /* when the file descriptor is closed a kqueue automatically deletes
-       its filters so we do not need to delete explicity the event
-       before the closing the file descriptor */
+    /*
+     * when the file descriptor is closed a kqueue automatically deletes
+     * its filters so we do not need to delete explicity the event
+     * before the closing the file descriptor.
+     */
 
     if (flags & NGX_CLOSE_EVENT) {
         return NGX_OK;
@@ -427,13 +428,17 @@ static int ngx_kqueue_process_events(ngx
 
             if (ev->oneshot && ev->timer_set) {
                 ngx_del_timer(ev);
-                ev->timer_set = 0;
             }
 
-            /* fall through */
+            ev->ready = 1;
+
+            ev->event_handler(ev);
+
+            break;
 
         case EVFILT_AIO:
             ev->ready = 1;
+            ev->active = 0;
 
             ev->event_handler(ev);