mirror of
https://github.com/nginx/nginx.git
synced 2026-09-01 02:58:40 +00:00
-p and --prefix=
This commit is contained in:
parent
df585ef949
commit
5ef370df40
13 changed files with 296 additions and 190 deletions
|
|
@ -1213,7 +1213,7 @@ ngx_http_script_add_full_name_code(ngx_http_script_compile_t *sc)
|
|||
}
|
||||
|
||||
code->code = (ngx_http_script_code_pt) ngx_http_script_full_name_len_code;
|
||||
code->prefix = sc->conf_prefix;
|
||||
code->conf_prefix = sc->conf_prefix;
|
||||
|
||||
code = ngx_http_script_add_code(*sc->values,
|
||||
sizeof(ngx_http_script_full_name_code_t),
|
||||
|
|
@ -1223,7 +1223,7 @@ ngx_http_script_add_full_name_code(ngx_http_script_compile_t *sc)
|
|||
}
|
||||
|
||||
code->code = ngx_http_script_full_name_code;
|
||||
code->prefix = sc->conf_prefix;
|
||||
code->conf_prefix = sc->conf_prefix;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
|
@ -1238,7 +1238,8 @@ ngx_http_script_full_name_len_code(ngx_http_script_engine_t *e)
|
|||
|
||||
e->ip += sizeof(ngx_http_script_full_name_code_t);
|
||||
|
||||
return code->prefix ? sizeof(NGX_CONF_PREFIX) : ngx_cycle->root.len;
|
||||
return code->conf_prefix ? ngx_cycle->conf_prefix.len:
|
||||
ngx_cycle->prefix.len;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1254,7 +1255,7 @@ ngx_http_script_full_name_code(ngx_http_script_engine_t *e)
|
|||
value.data = e->buf.data;
|
||||
value.len = e->pos - e->buf.data;
|
||||
|
||||
if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &value, code->prefix)
|
||||
if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &value, code->conf_prefix)
|
||||
!= NGX_OK)
|
||||
{
|
||||
e->ip = ngx_http_script_exit;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
ngx_http_script_code_pt code;
|
||||
uintptr_t prefix;
|
||||
uintptr_t conf_prefix;
|
||||
} ngx_http_script_full_name_code_t;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue