summaryrefslogtreecommitdiff
path: root/src/cli_val_engine.c
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-08 17:39:13 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-08 17:39:13 -0800
commit369fc3f7d589bf4380e544c84753ed2713ce20b5 (patch)
tree66114fd5f8df4d8b85714df4acb8214476ecac18 /src/cli_val_engine.c
parentcea9cff30b79419b922c0682c7b46b73791870da (diff)
downloadvyatta-cfg-369fc3f7d589bf4380e544c84753ed2713ce20b5.tar.gz
vyatta-cfg-369fc3f7d589bf4380e544c84753ed2713ce20b5.zip
fix for bug 2469: don't convert the string for directory references.
Diffstat (limited to 'src/cli_val_engine.c')
-rw-r--r--src/cli_val_engine.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cli_val_engine.c b/src/cli_val_engine.c
index 8090a2a..811b422 100644
--- a/src/cli_val_engine.c
+++ b/src/cli_val_engine.c
@@ -122,6 +122,7 @@ static char** clind_get_current_value(clind_path_ref cfg_path,
int *ret_size) {
char** ret=NULL;
+ int value_ref = 0;
*ret_size=0;
if(val_type) *val_type=TEXT_TYPE;
@@ -149,6 +150,7 @@ static char** clind_get_current_value(clind_path_ref cfg_path,
if(strcmp(cfg_end,VALUE_FILE)==0) {
/* Value reference: */
+ value_ref = 1;
if(return_value_file_name) {
@@ -216,13 +218,15 @@ static char** clind_get_current_value(clind_path_ref cfg_path,
if(ret) {
if(tmpl_end && (strcmp(tmpl_end,NODE_TAG)==0)) {
+ /* since it's a tag, it should be treated as a value */
+ value_ref = 1;
clind_path_pop(tmpl_path_clone);
tmpl_path_string = clind_path_get_path_string(tmpl_path_clone);
tmpl_end = clind_path_last_string(tmpl_path_clone);
}
}
- if(ret && tmpl_path_string && !return_value_file_name) {
+ if(ret && tmpl_path_string && value_ref && !return_value_file_name) {
vtw_def def;
struct stat statbuf;