Fix up state bypass get code
This commit is contained in:
parent
dafc6d10e0
commit
592c513b83
6 changed files with 30 additions and 13 deletions
|
|
@ -734,19 +734,21 @@ clicon_rpc_get(clicon_handle h,
|
|||
(kpath = clicon_option_str(h, "CLICON_STATE_PATH_KLUDGE")) != NULL &&
|
||||
strncmp(xpath, kpath, strlen(kpath)) == 0){
|
||||
}
|
||||
else
|
||||
else{
|
||||
#endif /* USE_STATE_PATH_KLUDGE */
|
||||
if ((ret = xml_bind_yang(xd, YB_MODULE, yspec, &xerr)) < 0)
|
||||
goto done;
|
||||
if ((ret = xml_bind_yang(xd, YB_MODULE, yspec, &xerr)) < 0)
|
||||
goto done;
|
||||
if (ret == 0){
|
||||
assert(xerr != NULL);
|
||||
if ((xd = xpath_first(xerr, NULL, "rpc-error")) == NULL){
|
||||
clicon_err(OE_XML, ENOENT, "Expected rpc-error tag but none found(internal)");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#ifdef USE_STATE_PATH_KLUDGE
|
||||
}
|
||||
#endif
|
||||
if (ret == 0){
|
||||
if ((xd = xpath_first(xerr, NULL, "rpc-error")) == NULL){
|
||||
clicon_err(OE_XML, ENOENT, "Expected rpc-error tag but none found(internal)");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (xt){
|
||||
if (xml_rm(xd) < 0)
|
||||
|
|
|
|||
|
|
@ -1603,7 +1603,7 @@ xml_merge(cxobj *x0,
|
|||
/* See if there is a corresponding node (x1c) in the base tree (x0) */
|
||||
if (yc && match_base_child(x0, x1c, yc, &x0c) < 0)
|
||||
goto done;
|
||||
/* Save x0c, x1c, yc and merge in second wave, so that x1c entries dont "interfer"
|
||||
/* Save x0c, x1c, yc and merge in second wave, so that x1c entries don't "interfere"
|
||||
* with itself, ie that later searches are among earlier objects already added
|
||||
* to x0 */
|
||||
twophase[i].mt_x0c = x0c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue