summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-09-03 08:41:42 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-09-03 08:41:42 +0000
commit9afd58ffe5c9535ec61dbf14289bcebea46efe60 (patch)
treea37d4b8da55a53ee12dd458742f6ddcd7f2f6151 /src/core
parent1b982e1c0001a3ad7f134d066f07f3bc69cc28cc (diff)
downloadnginx-9afd58ffe5c9535ec61dbf14289bcebea46efe60.tar.gz
nginx-9afd58ffe5c9535ec61dbf14289bcebea46efe60.tar.bz2
open_file_cache_events
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_open_file_cache.c6
-rw-r--r--src/core/ngx_open_file_cache.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index 1dc2d131d..87104a04a 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -353,8 +353,10 @@ create:
update:
- if (ngx_event_flags & NGX_USE_VNODE_EVENT && of->fd != NGX_INVALID_FILE) {
-
+ if ((ngx_event_flags & NGX_USE_VNODE_EVENT)
+ && of->events
+ && of->fd != NGX_INVALID_FILE)
+ {
file->event = ngx_calloc(sizeof(ngx_event_t), pool->log);
if (file->event== NULL) {
goto failed;
diff --git a/src/core/ngx_open_file_cache.h b/src/core/ngx_open_file_cache.h
index 90c75909d..cc0d899a2 100644
--- a/src/core/ngx_open_file_cache.h
+++ b/src/core/ngx_open_file_cache.h
@@ -23,6 +23,7 @@ typedef struct {
unsigned test_dir:1;
unsigned errors:1;
+ unsigned events:1;
unsigned is_dir:1;
unsigned is_file:1;