comparison src/core/nginx.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 96c4297375bc
children 85dea406e18f
comparison
equal deleted inserted replaced
6377:11e019750adc 6378:0f203a2af17c
158 NULL, /* exit master */ 158 NULL, /* exit master */
159 NGX_MODULE_V1_PADDING 159 NGX_MODULE_V1_PADDING
160 }; 160 };
161 161
162 162
163 ngx_uint_t ngx_max_module;
164
165 static ngx_uint_t ngx_show_help; 163 static ngx_uint_t ngx_show_help;
166 static ngx_uint_t ngx_show_version; 164 static ngx_uint_t ngx_show_version;
167 static ngx_uint_t ngx_show_configure; 165 static ngx_uint_t ngx_show_configure;
168 static u_char *ngx_prefix; 166 static u_char *ngx_prefix;
169 static u_char *ngx_conf_file; 167 static u_char *ngx_conf_file;
258 256
259 if (ngx_add_inherited_sockets(&init_cycle) != NGX_OK) { 257 if (ngx_add_inherited_sockets(&init_cycle) != NGX_OK) {
260 return 1; 258 return 1;
261 } 259 }
262 260
263 ngx_max_module = 0; 261 if (ngx_preinit_modules() != NGX_OK) {
264 for (i = 0; ngx_modules[i]; i++) { 262 return 1;
265 ngx_modules[i]->index = ngx_max_module++;
266 } 263 }
267 264
268 cycle = ngx_init_cycle(&init_cycle); 265 cycle = ngx_init_cycle(&init_cycle);
269 if (cycle == NULL) { 266 if (cycle == NULL) {
270 if (ngx_test_config) { 267 if (ngx_test_config) {