From 9afd58ffe5c9535ec61dbf14289bcebea46efe60 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 3 Sep 2007 08:41:42 +0000 Subject: open_file_cache_events --- src/core/ngx_open_file_cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/ngx_open_file_cache.c') 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; -- cgit