diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-07-28 19:08:43 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-07-28 19:08:43 -0700 |
commit | a56723cbb6424e1d49289efceeb9c251eed324bb (patch) | |
tree | 79f97da29cc8e1aa972ec978703622a61a34ae5b /src/cli_new.c | |
parent | de31f1befb8a92cecadd0c716f7313bd578511f9 (diff) | |
download | vyatta-cfg-a56723cbb6424e1d49289efceeb9c251eed324bb.tar.gz vyatta-cfg-a56723cbb6424e1d49289efceeb9c251eed324bb.zip |
add cstore-specific header file
Diffstat (limited to 'src/cli_new.c')
-rw-r--r-- | src/cli_new.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/cli_new.c b/src/cli_new.c index 9cc9777..a047f36 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -1471,18 +1471,19 @@ static int eval_va(valstruct *res, vtw_node *node) * cstore implementation. * handle is set => we are in cstore operation. */ - clind_val cv; - if (!cstore_get_var_ref(var_ref_handle, pathp, &cv, + vtw_type_e vtype; + char *vptr = NULL; + if (!cstore_get_var_ref(var_ref_handle, pathp, &vtype, &vptr, is_in_delete_action())) { status = -1; } else { /* success */ status = 0; - if(cv.value) { - res->val_type = cv.val_type; + if(vptr) { + res->val_type = vtype; res->val_types = NULL; res->free_me = TRUE; - res->val = cv.value; + res->val = vptr; } } } else { @@ -1648,10 +1649,11 @@ static int expand_string(char *stringp) * cstore implementation. * handle is set => we are in cstore operation. */ - clind_val cv; - if (cstore_get_var_ref(var_ref_handle, scanp, &cv, - is_in_delete_action())) { - cp=cv.value; + vtw_type_e vtype; + char *vptr = NULL; + if (cstore_get_var_ref(var_ref_handle, scanp, &vtype, &vptr, + is_in_delete_action()) && vptr) { + cp = vptr; } } else { /* legacy usage */ |