From 6ec19ddffc7ff6d8806a913314ceee6565d132c9 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Wed, 16 Apr 2008 13:18:14 -0700 Subject: modified fix for 2525--fixes problem introduced with last fix (bug 3163) --- src/cli_new.c | 2 +- src/cli_val_engine.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cli_new.c b/src/cli_new.c index 1ecbe83..26cc719 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -1435,7 +1435,7 @@ static int expand_string(char *stringp) if(clind_config_engine_apply_command_path(n_cfg_path, n_tmpl_path, n_cmd_path, - FALSE, + TRUE, &cv, get_cdirp(), get_tdirp(), diff --git a/src/cli_val_engine.c b/src/cli_val_engine.c index adf40a4..a81f413 100644 --- a/src/cli_val_engine.c +++ b/src/cli_val_engine.c @@ -56,6 +56,9 @@ #include "cli_val_engine.h" + +static int is_multi_node(clind_path_ref tmpl_path); + /********************* * Data definitions * @@ -129,6 +132,13 @@ static char** clind_get_current_value(clind_path_ref cfg_path, int value_ref = 0; *ret_size=0; + + if (check_existence) { + if (is_multi_node(tmpl_path)) { + check_existence = FALSE; + } + } + DPRINT("get_current_value cfg[%s] tmpl[%s] chkexist=%d\n", clind_path_get_path_string(cfg_path), clind_path_get_path_string(tmpl_path), @@ -217,6 +227,7 @@ static char** clind_get_current_value(clind_path_ref cfg_path, struct stat statbuf; /* Directory reference: */ + if(!check_existence || (lstat(cfg_path_string, &statbuf) == 0)) { ret=(char**)realloc(ret,sizeof(char*)*1); ret[0]=clind_unescape(cfg_end); -- cgit v1.2.3