summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Larson <slioch@eng-140.vyatta.com>2008-04-10 16:15:42 -0700
committerMichael Larson <slioch@eng-140.vyatta.com>2008-04-10 16:15:42 -0700
commit59f85019f6369719ba5b212934be71fcd94f910c (patch)
tree7b775810d477a1eb2e7bb91f68436891659f120a /src
parent4fc9e6eb6bf64a46238e82352e2b33c4805b4b42 (diff)
downloadvyatta-cfg-59f85019f6369719ba5b212934be71fcd94f910c.tar.gz
vyatta-cfg-59f85019f6369719ba5b212934be71fcd94f910c.zip
Revert "fix for bug 2525"
This reverts commit f352a460fdf15ac927d1deb4672c42b334eb8e67.
Diffstat (limited to 'src')
-rw-r--r--src/cli_val_engine.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cli_val_engine.c b/src/cli_val_engine.c
index 786c0cd..adf40a4 100644
--- a/src/cli_val_engine.c
+++ b/src/cli_val_engine.c
@@ -217,12 +217,10 @@ static char** clind_get_current_value(clind_path_ref cfg_path,
struct stat statbuf;
/* Directory reference: */
- if(!check_existence) {
- if (lstat(cfg_path_string, &statbuf) == 0) {
- ret=(char**)realloc(ret,sizeof(char*)*1);
- ret[0]=clind_unescape(cfg_end);
- *ret_size=1;
- }
+ if(!check_existence || (lstat(cfg_path_string, &statbuf) == 0)) {
+ ret=(char**)realloc(ret,sizeof(char*)*1);
+ ret[0]=clind_unescape(cfg_end);
+ *ret_size=1;
} else {
/* we are checking existence, and it doesn't exist */
/* return empty string */
@@ -232,7 +230,7 @@ static char** clind_get_current_value(clind_path_ref cfg_path,
*ret_size = 1;
}
}
-
+
if(ret) {
if(tmpl_end && (strcmp(tmpl_end,NODE_TAG)==0)) {
/* since it's a tag, it should be treated as a value */