summaryrefslogtreecommitdiffhomepage
path: root/src/stream/ngx_stream.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2016-02-04 18:30:21 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2016-02-04 18:30:21 +0300
commit798833457018ee8a6274ec78e816f747361c0d47 (patch)
treea8a905538380af822e90b3fc5571de836c3b3aba /src/stream/ngx_stream.c
parent9add42c71e71c2af8e67eceeeb773d22a9cab760 (diff)
downloadnginx-798833457018ee8a6274ec78e816f747361c0d47.tar.gz
nginx-798833457018ee8a6274ec78e816f747361c0d47.tar.bz2
Dynamic modules: moved module-related stuff to separate files.
Diffstat (limited to '')
-rw-r--r--src/stream/ngx_stream.c9
1 files changed, 1 insertions, 8 deletions
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 */