* Changed clicon_rpc_get and clicon_rpc_get_config functions: added username and replaced namespace with namespace context

* Fixed several issues with multiple namespaces.
This commit is contained in:
Olof hagsand 2019-10-03 22:01:16 +02:00
parent 3efd5703d6
commit 6e41592aec
16 changed files with 224 additions and 370 deletions

View file

@ -138,7 +138,7 @@ xml_nsctx_set(cvec *cvv,
/*! Create and initialize XML namespace context
* @param[in] prefix Namespace prefix, or NULL for default
* @param[in] namespace Cached namespace to set (assume non-null?)
* @param[in] namespace Set this namespace. If NULL create empty nsctx
* @retval nsc Return namespace context in form of a cvec
* @retval NULL Error
* @code
@ -161,7 +161,7 @@ xml_nsctx_init(char *prefix,
clicon_err(OE_XML, errno, "cvec_new");
goto done;
}
if (xml_nsctx_set(cvv, prefix, namespace) < 0)
if (namespace && xml_nsctx_set(cvv, prefix, namespace) < 0)
goto done;
done:
return cvv;