Fixed: Pretty-printed XML using prefixes not parsed correctly.
* eg `<a:x> <y/></a:x>` could lead to errors, wheras (`<x> <y/></x>`) works fine.
This commit is contained in:
parent
a2b1674708
commit
61e03690ca
2 changed files with 15 additions and 5 deletions
|
|
@ -4,11 +4,14 @@
|
||||||
|
|
||||||
Patch release based on testing by Dave Cornejo, Netgate
|
Patch release based on testing by Dave Cornejo, Netgate
|
||||||
|
|
||||||
### Minor changes
|
### API changes on existing features (you may need to change your code)
|
||||||
* Session-id CLI functionality delayed: "lazy evaluation"
|
* Session-id CLI functionality delayed: "lazy evaluation"
|
||||||
|
* C-api: Changed `clicon_session_id_get(clicon_handle h, uint32_t *id)`
|
||||||
* From a cli perspective this is a revert to 4.1 behaviour, where the cli does not immediately exit on start if the backend is not running, but with the new session-id function
|
* From a cli perspective this is a revert to 4.1 behaviour, where the cli does not immediately exit on start if the backend is not running, but with the new session-id function
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
* Fixed: Pretty-printed XML using prefixes not parsed correctly.
|
||||||
|
* eg `<a:x> <y/></a:x>` could lead to errors, wheras (`<x> <y/></x>`) works fine.
|
||||||
* XML namespace merge bug fixed. Example: two xmlns attributes could both survive a merge whereas one should replace the other.
|
* XML namespace merge bug fixed. Example: two xmlns attributes could both survive a merge whereas one should replace the other.
|
||||||
* Compile option `VALIDATE_STATE_XML` introduced in `include/custom.h` to control whether code for state data validation is compiled or not.
|
* Compile option `VALIDATE_STATE_XML` introduced in `include/custom.h` to control whether code for state data validation is compiled or not.
|
||||||
* Fixed: Validation of user state data led to wrong validation, if state relied on config data, eg leafref/must/when etc.
|
* Fixed: Validation of user state data led to wrong validation, if state relied on config data, eg leafref/must/when etc.
|
||||||
|
|
|
||||||
|
|
@ -335,10 +335,17 @@ xml_parse_bslash2(struct xml_parse_yacc_arg *ya,
|
||||||
while ((xc = xml_child_each(x, xc, CX_ELMNT)) != NULL)
|
while ((xc = xml_child_each(x, xc, CX_ELMNT)) != NULL)
|
||||||
break;
|
break;
|
||||||
if (xc != NULL){ /* at least one element */
|
if (xc != NULL){ /* at least one element */
|
||||||
xc = NULL;
|
int i;
|
||||||
while ((xc = xml_child_each(x, xc, CX_BODY)) != NULL) {
|
for (i=0; i<xml_child_nr(x);){
|
||||||
xml_value_set(xc, ""); /* XXX remove */
|
xc = xml_child_i(x, i);
|
||||||
}
|
if (xml_type(xc) != CX_BODY){
|
||||||
|
i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (xml_child_rm(x, i) < 0)
|
||||||
|
goto done;
|
||||||
|
xml_free(xc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
retval = 0;
|
retval = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue