diff src/http/ngx_http_script.c @ 2758:77264e0157ad

-p and --prefix=
author Igor Sysoev <igor@sysoev.ru>
date Mon, 27 Apr 2009 11:32:33 +0000
parents 09cab3f8d92e
children 32b444fa2ca4 501fd3ae3188
line wrap: on
line diff
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -1213,7 +1213,7 @@ ngx_http_script_add_full_name_code(ngx_h
     }
 
     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_h
     }
 
     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_h
 
     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_
     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;