Mercurial > hg > nginx
diff src/http/ngx_http.c @ 177:4db54fdbcbe7
nginx-0.0.1-2003-11-10-20:17:31 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Nov 2003 17:17:31 +0000 |
parents | c0552e5ab567 |
children | c1f3a3c7c5db |
line wrap: on
line diff
--- a/src/http/ngx_http.c Sun Nov 09 20:03:38 2003 +0000 +++ b/src/http/ngx_http.c Mon Nov 10 17:17:31 2003 +0000 @@ -107,6 +107,12 @@ module = ngx_modules[m]->ctx; mi = ngx_modules[m]->ctx_index; + if (module->pre_conf) { + if (module->pre_conf(cf) != NGX_OK) { + return NGX_CONF_ERROR; + } + } + if (module->create_main_conf) { ngx_test_null(ctx->main_conf[mi], module->create_main_conf(cf), NGX_CONF_ERROR); @@ -157,6 +163,7 @@ if (module->init_main_conf) { rv = module->init_main_conf(cf, ctx->main_conf[mi]); if (rv != NGX_CONF_OK) { + *cf = pcf; return rv; } } @@ -170,6 +177,7 @@ ctx->srv_conf[mi], cscfp[s]->ctx->srv_conf[mi]); if (rv != NGX_CONF_OK) { + *cf = pcf; return rv; } } @@ -182,6 +190,7 @@ ctx->loc_conf[mi], cscfp[s]->ctx->loc_conf[mi]); if (rv != NGX_CONF_OK) { + *cf = pcf; return rv; } @@ -194,6 +203,7 @@ cscfp[s]->ctx->loc_conf[mi], clcfp[l]->loc_conf[mi]); if (rv != NGX_CONF_OK) { + *cf = pcf; return rv; } } @@ -201,6 +211,8 @@ } } + /* we needed "http"'s cf->ctx while merging configuration */ + *cf = pcf; /* init lists of the handlers */ @@ -557,6 +569,5 @@ } /**/ - *cf = pcf; return NGX_CONF_OK; }