From 798833457018ee8a6274ec78e816f747361c0d47 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Thu, 4 Feb 2016 18:30:21 +0300 Subject: Dynamic modules: moved module-related stuff to separate files. --- src/stream/ngx_stream.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/stream') diff --git a/src/stream/ngx_stream.c b/src/stream/ngx_stream.c index f0aa532b6..045b6f3cf 100644 --- a/src/stream/ngx_stream.c +++ b/src/stream/ngx_stream.c @@ -91,14 +91,7 @@ ngx_stream_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) /* count the number of the stream modules and set up their indices */ - ngx_stream_max_module = 0; - for (m = 0; ngx_modules[m]; m++) { - if (ngx_modules[m]->type != NGX_STREAM_MODULE) { - continue; - } - - ngx_modules[m]->ctx_index = ngx_stream_max_module++; - } + ngx_stream_max_module = ngx_count_modules(cf->cycle, NGX_STREAM_MODULE); /* the stream main_conf context, it's the same in the all stream contexts */ -- cgit