Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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/http/ngx_http.c
parent9add42c71e71c2af8e67eceeeb773d22a9cab760 (diff)
Dynamic modules: moved module-related stuff to separate files.
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r--src/http/ngx_http.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 64af44760..05bc48b0f 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -144,14 +144,7 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
/* count the number of the http modules and set up their indices */
- ngx_http_max_module = 0;
- for (m = 0; ngx_modules[m]; m++) {
- if (ngx_modules[m]->type != NGX_HTTP_MODULE) {
- continue;
- }
-
- ngx_modules[m]->ctx_index = ngx_http_max_module++;
- }
+ ngx_http_max_module = ngx_count_modules(cf->cycle, NGX_HTTP_MODULE);
/* the http main_conf context, it is the same in the all http contexts */