summaryrefslogtreecommitdiff
path: root/src/cli_val_engine.c
diff options
context:
space:
mode:
authorMichael Larson <slioch@eng-140.vyatta.com>2008-04-16 13:18:14 -0700
committerMichael Larson <slioch@eng-140.vyatta.com>2008-04-16 13:18:14 -0700
commit6ec19ddffc7ff6d8806a913314ceee6565d132c9 (patch)
tree1842c0a899ac562fe204056d5af213980208678a /src/cli_val_engine.c
parentc6f6b26e6ab046bf2606bc4f85dd04f001dac40c (diff)
downloadvyatta-cfg-6ec19ddffc7ff6d8806a913314ceee6565d132c9.tar.gz
vyatta-cfg-6ec19ddffc7ff6d8806a913314ceee6565d132c9.zip
modified fix for 2525--fixes problem introduced with last fix (bug 3163)
Diffstat (limited to 'src/cli_val_engine.c')
-rw-r--r--src/cli_val_engine.c11
1 files changed, 11 insertions, 0 deletions
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);