Replaced ngx_conf_full_name() with ngx_get_full_name(). The ngx_get_full_name() function takes more readable arguments list.
diff --git a/src/core/nginx.c b/src/core/nginx.c index 4cc8082..9cabac1 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c
@@ -897,7 +897,9 @@ ngx_str_set(&cycle->conf_file, NGX_CONF_PATH); } - if (ngx_conf_full_name(cycle, &cycle->conf_file, 0) != NGX_OK) { + if (ngx_get_full_name(cycle->pool, &cycle->prefix, &cycle->conf_file) + != NGX_OK) + { return NGX_ERROR; } @@ -1013,7 +1015,7 @@ ngx_str_set(&ccf->pid, NGX_PID_PATH); } - if (ngx_conf_full_name(cycle, &ccf->pid, 0) != NGX_OK) { + if (ngx_get_full_name(cycle->pool, &cycle->prefix, &ccf->pid) != NGX_OK) { return NGX_CONF_ERROR; } @@ -1061,7 +1063,9 @@ ngx_str_set(&ccf->lock_file, NGX_LOCK_PATH); } - if (ngx_conf_full_name(cycle, &ccf->lock_file, 0) != NGX_OK) { + if (ngx_get_full_name(cycle->pool, &cycle->prefix, &ccf->lock_file) + != NGX_OK) + { return NGX_CONF_ERROR; }
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index 6cfb5d5..3848342 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c
@@ -747,7 +747,7 @@ ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); - if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, &file) != NGX_OK) { return NGX_CONF_ERROR; } @@ -822,7 +822,7 @@ if (name->len) { full = *name; - if (ngx_conf_full_name(cycle, &full, 0) != NGX_OK) { + if (ngx_get_full_name(cycle->pool, &cycle->prefix, &full) != NGX_OK) { return NULL; }
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c index 28e8871..049b876 100644 --- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c
@@ -355,7 +355,9 @@ path->name.len--; } - if (ngx_conf_full_name(cf->cycle, &path->name, 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &path->name) + != NGX_OK) + { return NULL; } @@ -409,7 +411,9 @@ (*path)->name = init->name; - if (ngx_conf_full_name(cf->cycle, &(*path)->name, 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &(*path)->name) + != NGX_OK) + { return NGX_CONF_ERROR; }
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 50746e7..1459eea 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c
@@ -240,7 +240,7 @@ X509 *x509; u_long n; - if (ngx_conf_full_name(cf->cycle, cert, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, cert) != NGX_OK) { return NGX_ERROR; } @@ -319,7 +319,7 @@ BIO_free(bio); - if (ngx_conf_full_name(cf->cycle, key, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, key) != NGX_OK) { return NGX_ERROR; } @@ -350,7 +350,7 @@ return NGX_OK; } - if (ngx_conf_full_name(cf->cycle, cert, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, cert) != NGX_OK) { return NGX_ERROR; } @@ -394,7 +394,7 @@ return NGX_OK; } - if (ngx_conf_full_name(cf->cycle, cert, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, cert) != NGX_OK) { return NGX_ERROR; } @@ -421,7 +421,7 @@ return NGX_OK; } - if (ngx_conf_full_name(cf->cycle, crl, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, crl) != NGX_OK) { return NGX_ERROR; } @@ -587,7 +587,7 @@ return NGX_OK; } - if (ngx_conf_full_name(cf->cycle, file, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, file) != NGX_OK) { return NGX_ERROR; }
diff --git a/src/event/ngx_event_openssl_stapling.c b/src/event/ngx_event_openssl_stapling.c index 7707614..f02eab6 100644 --- a/src/event/ngx_event_openssl_stapling.c +++ b/src/event/ngx_event_openssl_stapling.c
@@ -197,7 +197,7 @@ staple = SSL_CTX_get_ex_data(ssl->ctx, ngx_ssl_stapling_index); - if (ngx_conf_full_name(cf->cycle, file, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, file) != NGX_OK) { return NGX_ERROR; }
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index 34c3b19..711871b 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c
@@ -1327,7 +1327,7 @@ ngx_sprintf(file.data, "%V.bin%Z", name); - if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->conf_prefix, &file) != NGX_OK) { return NGX_CONF_ERROR; }
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c index aa6a3fc..505ae3b 100644 --- a/src/http/modules/ngx_http_log_module.c +++ b/src/http/modules/ngx_http_log_module.c
@@ -1134,7 +1134,9 @@ } } else { - if (ngx_conf_full_name(cf->cycle, &value[1], 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &value[1]) + != NGX_OK) + { return NGX_CONF_ERROR; }
diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c index 9e85693..6bf3828 100644 --- a/src/http/modules/ngx_http_xslt_filter_module.c +++ b/src/http/modules/ngx_http_xslt_filter_module.c
@@ -892,7 +892,7 @@ ngx_memzero(sheet, sizeof(ngx_http_xslt_sheet_t)); - if (ngx_conf_full_name(cf->cycle, &value[1], 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &value[1]) != NGX_OK) { return NGX_CONF_ERROR; }
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index 90e32e8..a8a4184 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c
@@ -485,7 +485,9 @@ if (pmcf->modules != NGX_CONF_UNSET_PTR) { m = pmcf->modules->elts; for (i = 0; i < pmcf->modules->nelts; i++) { - if (ngx_conf_full_name(cf->cycle, &m[i], 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &m[i]) + != NGX_OK) + { return NGX_CONF_ERROR; } }
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index ffe7fb4..5273fe3 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c
@@ -3686,7 +3686,9 @@ if (prev->root.data == NULL) { ngx_str_set(&conf->root, "html"); - if (ngx_conf_full_name(cf->cycle, &conf->root, 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &conf->root) + != NGX_OK) + { return NGX_CONF_ERROR; } } @@ -4428,7 +4430,9 @@ } if (clcf->root.data[0] != '$') { - if (ngx_conf_full_name(cf->cycle, &clcf->root, 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &clcf->root) + != NGX_OK) + { return NGX_CONF_ERROR; } }
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c index eacca59..0b90c41 100644 --- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c
@@ -1626,7 +1626,9 @@ cache->path->name.len--; } - if (ngx_conf_full_name(cf->cycle, &cache->path->name, 0) != NGX_OK) { + if (ngx_get_full_name(cf->pool, &cf->cycle->prefix, &cache->path->name) + != NGX_OK) + { return NGX_CONF_ERROR; }
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index 1da793b..7af48ee 100644 --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c
@@ -131,7 +131,12 @@ if ((v->len == 0 || v->data[0] != '$') && (ccv->conf_prefix || ccv->root_prefix)) { - if (ngx_conf_full_name(ccv->cf->cycle, v, ccv->conf_prefix) != NGX_OK) { + if (ngx_get_full_name(ccv->cf->pool, + ccv->conf_prefix ? &ccv->cf->cycle->conf_prefix: + &ccv->cf->cycle->prefix, + v) + != NGX_OK) + { return NGX_ERROR; }