comparison src/event/ngx_event.c @ 6378:0f203a2af17c

Dynamic modules: moved module-related stuff to separate files.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 04 Feb 2016 18:30:21 +0300
parents dceb078b1156
children cf5e822cf470
comparison
equal deleted inserted replaced
6377:11e019750adc 6378:0f203a2af17c
889 return "is duplicate"; 889 return "is duplicate";
890 } 890 }
891 891
892 /* count the number of the event modules and set up their indices */ 892 /* count the number of the event modules and set up their indices */
893 893
894 ngx_event_max_module = 0; 894 ngx_event_max_module = ngx_count_modules(cf->cycle, NGX_EVENT_MODULE);
895 for (i = 0; ngx_modules[i]; i++) {
896 if (ngx_modules[i]->type != NGX_EVENT_MODULE) {
897 continue;
898 }
899
900 ngx_modules[i]->ctx_index = ngx_event_max_module++;
901 }
902 895
903 ctx = ngx_pcalloc(cf->pool, sizeof(void *)); 896 ctx = ngx_pcalloc(cf->pool, sizeof(void *));
904 if (ctx == NULL) { 897 if (ctx == NULL) {
905 return NGX_CONF_ERROR; 898 return NGX_CONF_ERROR;
906 } 899 }