* Support for multiple patterns as described in RFC7950 Section 9.4.7

* Added regex cache to type resolution
* Added compiled regexp parameter as part of internal yang type resolution functions
* All internal `ys_populate_*()` functions (except ys_populate()) have switched parameters: `clicon_handle, yang_stmt *)`
This commit is contained in:
Olof hagsand 2019-05-29 11:39:09 +02:00
parent efd1330550
commit 2fe185d683
21 changed files with 854 additions and 604 deletions

View file

@ -437,7 +437,7 @@ xmldb_get_nocache(clicon_handle h,
goto done;
/* Add default values (if not set) */
if (xml_apply(xt, CX_ELMNT, xml_default, NULL) < 0)
if (xml_apply(xt, CX_ELMNT, xml_default, h) < 0)
goto done;
#if 0 /* debug */
if (xml_apply0(xt, -1, xml_sort_verify, NULL) < 0)
@ -542,7 +542,7 @@ xmldb_get_cache(clicon_handle h,
goto done;
/* x1t is wrong here should be <config><system>.. but is <system>.. */
/* XXX where should we apply default values once? */
if (xml_apply(x1t, CX_ELMNT, xml_default, NULL) < 0)
if (xml_apply(x1t, CX_ELMNT, xml_default, h) < 0)
goto done;
/* Copy the matching parts of the (relevant) XML tree.
@ -622,7 +622,7 @@ xmldb_get_zerocopy(clicon_handle h,
xml_apply_ancestor(x0, (xml_applyfn_t*)xml_flag_set, (void*)XML_FLAG_CHANGE);
}
/* Apply default values (removed in clear function) */
if (xml_apply(x0t, CX_ELMNT, xml_default, NULL) < 0)
if (xml_apply(x0t, CX_ELMNT, xml_default, h) < 0)
goto done;
if (debug>1)
clicon_xml2file(stderr, x0t, 0, 1);