* Made a separate Clixon datastore XML/JSON top-level symbol

* Replaces the hardcoded "config" keyword.
  * Implemented by a compile-time option called `DATASTORE_TOP_SYMBOL` option in clixon_custom.h
* Tests: added endtest to all tests. Removed all premature exits if BE=0
This commit is contained in:
Olof hagsand 2021-03-05 14:15:15 +01:00
parent 2ab90d847b
commit b7991d9b39
132 changed files with 939 additions and 628 deletions

View file

@ -217,6 +217,7 @@ xmldb_copy(clicon_handle h,
else if (x2 == NULL){ /* create x2 and copy from x1 */
if ((x2 = xml_new(xml_name(x1), NULL, CX_ELMNT)) == NULL)
goto done;
xml_flag_set(x2, XML_FLAG_TOP);
if (xml_copy(x1, x2) < 0)
goto done;
}
@ -224,6 +225,7 @@ xmldb_copy(clicon_handle h,
xml_free(x2);
if ((x2 = xml_new(xml_name(x1), NULL, CX_ELMNT)) == NULL)
goto done;
xml_flag_set(x2, XML_FLAG_TOP);
if (xml_copy(x1, x2) < 0)
goto done;
}
@ -372,7 +374,7 @@ xmldb_exists(clicon_handle h,
return retval;
}
/*! Clear database cache if any for mem/size optimization only
/*! Clear database cache if any for mem/size optimization only, not file itself
* @param[in] h Clicon handle
* @param[in] db Database
* @retval -1 Error