aboutsummaryrefslogtreecommitdiff
path: root/src/event/ngx_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/ngx_event.c')
-rw-r--r--src/event/ngx_event.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
index bd451bc65..ef25ffc51 100644
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -174,10 +174,25 @@ static ngx_int_t ngx_event_module_init(ngx_cycle_t *cycle)
{
#if !(NGX_WIN32)
- size_t size;
- char *shared;
- ngx_core_conf_t *ccf;
- ngx_event_conf_t *ecf;
+ size_t size;
+ void ***cf;
+ char *shared;
+ ngx_core_conf_t *ccf;
+ ngx_event_conf_t *ecf;
+
+ cf = ngx_get_conf(cycle->conf_ctx, ngx_events_module);
+
+ if (cf == NULL) {
+ ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
+ "no \"events\" section in configuration");
+ return NGX_ERROR;
+ }
+
+ ecf = (*cf)[ngx_event_core_module.ctx_index];
+
+ ngx_log_error(NGX_LOG_INFO, cycle->log, 0,
+ "using the \"%s\" event method", ecf->name);
+
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
@@ -185,8 +200,6 @@ static ngx_int_t ngx_event_module_init(ngx_cycle_t *cycle)
return NGX_OK;
}
- ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module);
-
/* TODO: 128 is cache line size */