Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
5055:ac3690ee6c28 | 5056:63bc961253eb |
---|---|
890 void ***ctx; | 890 void ***ctx; |
891 ngx_uint_t i; | 891 ngx_uint_t i; |
892 ngx_conf_t pcf; | 892 ngx_conf_t pcf; |
893 ngx_event_module_t *m; | 893 ngx_event_module_t *m; |
894 | 894 |
895 if (*(void **) conf) { | |
896 return "is duplicate"; | |
897 } | |
898 | |
895 /* count the number of the event modules and set up their indices */ | 899 /* count the number of the event modules and set up their indices */ |
896 | 900 |
897 ngx_event_max_module = 0; | 901 ngx_event_max_module = 0; |
898 for (i = 0; ngx_modules[i]; i++) { | 902 for (i = 0; ngx_modules[i]; i++) { |
899 if (ngx_modules[i]->type != NGX_EVENT_MODULE) { | 903 if (ngx_modules[i]->type != NGX_EVENT_MODULE) { |