diff src/event/ngx_event.c @ 5056:63bc961253eb stable-1.2

Merge of r4999, r5003: detect duplicate "events" and "keepalive". *) Upstream keepalive: detect duplicate "keepalive" directive. A failure to detect duplicate "keepalive" directive resulted in stack exhaustion. *) Events: added check for duplicate "events" directive.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 11 Feb 2013 14:58:25 +0000
parents 9be0b6b749ae
children a29c574d61fa
line wrap: on
line diff
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -892,6 +892,10 @@ ngx_events_block(ngx_conf_t *cf, ngx_com
     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;