Mercurial > hg > nginx
diff src/event/modules/ngx_kqueue_module.c @ 583:4e296b7d25bf release-0.3.13
nginx-0.3.13-RELEASE import
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS.
*) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and
/dev/poll methods.
*) Bugfix: in SSI handling.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: the "auth_basic" directive did not disable the
authorization; the bug had appeared in 0.3.11.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 05 Dec 2005 13:18:09 +0000 |
parents | 1af2fcb3be8a |
children | 7a16e281c01f |
line wrap: on
line diff
--- a/src/event/modules/ngx_kqueue_module.c Sat Nov 26 10:11:11 2005 +0000 +++ b/src/event/modules/ngx_kqueue_module.c Mon Dec 05 13:18:09 2005 +0000 @@ -276,8 +276,10 @@ ngx_kqueue_add_event(ngx_event_t *ev, int event, u_int flags) { ngx_int_t rc; +#if 0 ngx_event_t *e; ngx_connection_t *c; +#endif ev->active = 1; ev->disabled = 0; @@ -285,12 +287,11 @@ ngx_mutex_lock(list_mutex); -#if 1 +#if 0 - if (nchanges > 0 - && ev->index < (u_int) nchanges + if (ev->index < (u_int) nchanges && ((uintptr_t) change_list[ev->index].udata & (uintptr_t) ~1) - == (uintptr_t) ev) + == (uintptr_t) ev) { if (change_list[ev->index].flags == EV_DISABLE) { @@ -346,12 +347,9 @@ ngx_mutex_lock(list_mutex); -#if 1 - - if (nchanges > 0 - && ev->index < (u_int) nchanges + if (ev->index < (u_int) nchanges && ((uintptr_t) change_list[ev->index].udata & (uintptr_t) ~1) - == (uintptr_t) ev) + == (uintptr_t) ev) { ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0, "kevent deleted: %d: ft:%d", @@ -359,7 +357,9 @@ /* if the event is still not passed to a kernel we will not pass it */ - if (ev->index < (u_int) --nchanges) { + nchanges--; + + if (ev->index < (u_int) nchanges) { e = (ngx_event_t *) ((uintptr_t) change_list[nchanges].udata & (uintptr_t) ~1); change_list[ev->index] = change_list[nchanges]; @@ -371,8 +371,6 @@ return NGX_OK; } -#endif - /* * when the file descriptor is closed the kqueue automatically deletes * its filters so we do not need to delete explicity the event @@ -551,7 +549,9 @@ if (event_list[i].flags & EV_ERROR) { ngx_log_error(NGX_LOG_ALERT, cycle->log, event_list[i].data, - "kevent() error on %d", event_list[i].ident); + "kevent() error on %d filter:%d flags:%04Xd", + event_list[i].ident, event_list[i].filter, + event_list[i].flags); continue; }