Fixed: Fail on return errors when reading from datastore

This commit is contained in:
Olof hagsand 2024-04-24 13:48:06 +02:00
parent aba5c68fe2
commit bd290e4594
10 changed files with 87 additions and 20 deletions

View file

@ -817,11 +817,14 @@ xmldb_get_cache(clixon_handle h,
* @retval -1 Error
* @note Use of 1 for OK
* @code
* if (xmldb_get(xh, "running", NULL, "/interfaces/interface[name="eth"]", &xt) < 0)
* if ((ret = xmldb_get(xh, "running", NULL, "/interfaces/interface[name="eth"]", &xt)) < 0)
* err;
* if (ret == 0)
* err;
* xml_free(xt);
* @endcode
* @see xmldb_get0 Underlying more capable API for enabling zero-copy
* XXX: OBSOLETE: use xmldb_get0 directly
*/
int
xmldb_get(clixon_handle h,