]> git.kaiwu.me - nginx.git/commitdiff
Events: added check for duplicate "events" directive.
authorValentin Bartenev <vbart@nginx.com>
Tue, 8 Jan 2013 14:03:37 +0000 (14:03 +0000)
committerValentin Bartenev <vbart@nginx.com>
Tue, 8 Jan 2013 14:03:37 +0000 (14:03 +0000)
src/event/ngx_event.c

index 976bd646581caa3db7603e9d3cb818b00d2e4098..cbae0ee6ad79517743d3fa5728fc8eccb53613ae 100644 (file)
@@ -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;