comparison src/stream/ngx_stream.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 78c06e5e1d76
children cf5e822cf470
comparison
equal deleted inserted replaced
6377:11e019750adc 6378:0f203a2af17c
89 89
90 *(ngx_stream_conf_ctx_t **) conf = ctx; 90 *(ngx_stream_conf_ctx_t **) conf = ctx;
91 91
92 /* count the number of the stream modules and set up their indices */ 92 /* count the number of the stream modules and set up their indices */
93 93
94 ngx_stream_max_module = 0; 94 ngx_stream_max_module = ngx_count_modules(cf->cycle, NGX_STREAM_MODULE);
95 for (m = 0; ngx_modules[m]; m++) {
96 if (ngx_modules[m]->type != NGX_STREAM_MODULE) {
97 continue;
98 }
99
100 ngx_modules[m]->ctx_index = ngx_stream_max_module++;
101 }
102 95
103 96
104 /* the stream main_conf context, it's the same in the all stream contexts */ 97 /* the stream main_conf context, it's the same in the all stream contexts */
105 98
106 ctx->main_conf = ngx_pcalloc(cf->pool, 99 ctx->main_conf = ngx_pcalloc(cf->pool,