Mercurial > hg > nginx
changeset 312:f5431a4bbc7d
nginx-0.0.3-2004-04-13-09:27:03 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 13 Apr 2004 05:27:03 +0000 |
parents | 11ff50a35d6d |
children | 98f1a8028067 |
files | src/event/modules/ngx_epoll_module.c src/event/ngx_event_accept.c src/http/modules/proxy/ngx_http_proxy_handler.c src/os/unix/ngx_linux_init.c src/os/unix/ngx_solaris_init.c |
diffstat | 5 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/modules/ngx_epoll_module.c Mon Apr 12 16:38:09 2004 +0000 +++ b/src/event/modules/ngx_epoll_module.c Tue Apr 13 05:27:03 2004 +0000 @@ -434,10 +434,6 @@ c->write->returned_instance = instance; } -#if (NGX_DEBUG) - log = c->log ? c->log : cycle->log; -#endif - if (c->read->instance != instance) { /* @@ -445,11 +441,15 @@ * that was just closed in this iteration */ - ngx_log_debug1(NGX_LOG_DEBUG_EVENT, log, 0, + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "epoll: stale event " PTR_FMT, c); continue; } +#if (NGX_DEBUG) + log = c->log ? c->log : cycle->log; +#endif + ngx_log_debug3(NGX_LOG_DEBUG_EVENT, log, 0, "epoll: fd:%d ev:%04X d:" PTR_FMT, c->fd, event_list[i].events, event_list[i].data);
--- a/src/event/ngx_event_accept.c Mon Apr 12 16:38:09 2004 +0000 +++ b/src/event/ngx_event_accept.c Tue Apr 13 05:27:03 2004 +0000 @@ -328,7 +328,6 @@ if (*ngx_accept_mutex == 0 && ngx_atomic_cmp_set(ngx_accept_mutex, 0, ngx_pid)) { - ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "accept mutex locked");
--- a/src/http/modules/proxy/ngx_http_proxy_handler.c Mon Apr 12 16:38:09 2004 +0000 +++ b/src/http/modules/proxy/ngx_http_proxy_handler.c Tue Apr 13 05:27:03 2004 +0000 @@ -425,6 +425,10 @@ n = recv(c->fd, buf, 1, MSG_PEEK); + if (ev->write && n >= 0) { + return; + } + if (n > 0) { if ((ngx_event_flags & NGX_USE_LEVEL_EVENT) && ev->active) { if (ngx_del_event(ev, NGX_READ_EVENT, 0) == NGX_ERROR) {
--- a/src/os/unix/ngx_linux_init.c Mon Apr 12 16:38:09 2004 +0000 +++ b/src/os/unix/ngx_linux_init.c Tue Apr 13 05:27:03 2004 +0000 @@ -9,10 +9,15 @@ ngx_os_io_t ngx_os_io = { ngx_unix_recv, + ngx_readv_chain, NULL, - NULL, +#if (HAVE_SENDFILE) ngx_linux_sendfile_chain, NGX_IO_SENDFILE +#else + ngx_writev_chain, + 0 +#endif };