Non-key list now not accepted in edit-config (before only on validation)
This commit is contained in:
parent
4e23864acd
commit
06e6ef80d1
25 changed files with 620 additions and 71 deletions
|
|
@ -715,18 +715,16 @@ xp_relop(xp_ctx *xc1,
|
|||
s1 = xml_body(x);
|
||||
switch(op){
|
||||
case XO_EQ:
|
||||
if (s1==NULL || s2==NULL){
|
||||
clicon_err(OE_XML, EINVAL, "Malformed xpath: empty string");
|
||||
goto done;
|
||||
}
|
||||
xr->xc_bool = (strcmp(s1, s2)==0);
|
||||
if (s1 == NULL || s2 == NULL)
|
||||
xr->xc_bool = (s1==NULL && s2 == NULL);
|
||||
else
|
||||
xr->xc_bool = (strcmp(s1, s2)==0);
|
||||
break;
|
||||
case XO_NE:
|
||||
if (s1==NULL || s2==NULL){
|
||||
clicon_err(OE_XML, EINVAL, "Malformed xpath: empty string");
|
||||
goto done;
|
||||
}
|
||||
xr->xc_bool = (strcmp(s1, s2));
|
||||
if (s1 == NULL || s2 == NULL)
|
||||
xr->xc_bool = !(s1==NULL && s2 == NULL);
|
||||
else
|
||||
xr->xc_bool = (strcmp(s1, s2));
|
||||
break;
|
||||
default:
|
||||
clicon_err(OE_XML, 0, "Operator %s not supported for nodeset and string", clicon_int2str(xpopmap,op));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue