From a6ea2f8f4813efd6606d5d31481ae613cb114e76 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 8 Jan 2013 14:03:37 +0000 Subject: [PATCH] Events: added check for duplicate "events" directive. --- src/event/ngx_event.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index 976bd6465..cbae0ee6a 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -892,6 +892,10 @@ ngx_events_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_conf_t pcf; ngx_event_module_t *m; + if (*(void **) conf) { + return "is duplicate"; + } + /* count the number of the event modules and set up their indices */ ngx_event_max_module = 0;