sanity checkof xret in param
test: updated to new openconfig network-instance version
This commit is contained in:
parent
f46d675370
commit
8db7892e38
2 changed files with 14 additions and 10 deletions
|
|
@ -825,7 +825,7 @@ xmldb_get_nocache(clicon_handle h,
|
|||
* @param[in] nsc External XML namespace context, or NULL
|
||||
* @param[in] xpath String with XPATH syntax. or NULL for all
|
||||
* @param[in] wdef With-defaults parameter, see RFC 6243
|
||||
* @param[out] xret Single return XML tree. Free with xml_free()
|
||||
* @param[out] xtop Single return XML tree. Free with xml_free()
|
||||
* @param[out] msdiff If set, return modules-state differences
|
||||
* @param[out] xerr XML error if retval is 0
|
||||
* @retval -1 General error, check specific clicon_errno, clicon_suberrno
|
||||
|
|
@ -1254,6 +1254,10 @@ xmldb_get0(clicon_handle h,
|
|||
{
|
||||
int retval = -1;
|
||||
|
||||
if (xret == NULL){
|
||||
clicon_err(OE_DB, EINVAL, "xret is NULL");
|
||||
goto done;
|
||||
}
|
||||
switch (clicon_datastore_cache(h)){
|
||||
case DATASTORE_NOCACHE:
|
||||
/* Read from file into created/copy tree, prune non-matching xpath
|
||||
|
|
@ -1280,6 +1284,7 @@ xmldb_get0(clicon_handle h,
|
|||
retval = xmldb_get_cache(h, db, yb, nsc, xpath, wdef, xret, msdiff, xerr);
|
||||
break;
|
||||
}
|
||||
done:
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ cat <<EOF > $dir/startup_db
|
|||
<config>
|
||||
<name>default</name>
|
||||
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
|
||||
<enabled>true</enabled>
|
||||
<router-id>1.2.3.4</router-id>
|
||||
</config>
|
||||
</network-instance>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue