diff --git a/CHANGELOG b/CHANGELOG
index 0e298e21..82e6473d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -29,6 +29,7 @@
#
# ***** END LICENSE BLOCK *****
+
- The netconf support has been extended with lock/unlock
- clicon_rpc_call() has been removed and should be replaced by extending the
internal netconf protocol.
@@ -46,6 +47,12 @@
clicon_rpc_get_config(h, dbstr, api_path, &xt);
xpath_vec(xt, api_path, &xvec, &xlen)
+- clicon_rpc_change() is replaced with clicon_rpc_edit_config().
+ Note modify argument 5:
+ clicon_rpc_change(h, db, op, apipath, "value")
+ to:
+ clicon_rpc_edit_config(h, db, op, apipath, "value")
+
- xmdlb_put_xkey() and xmldb_put_tree() have been folded into xmldb_put()
Replace xmldb_put_xkey with xmldb_put as follows:
xmldb_put_xkey(h, "candidate", cbuf_get(cb), str, OP_REPLACE);
diff --git a/apps/netconf/netconf_plugin.c b/apps/netconf/netconf_plugin.c
index b18e5c61..ce68c92b 100644
--- a/apps/netconf/netconf_plugin.c
+++ b/apps/netconf/netconf_plugin.c
@@ -256,8 +256,6 @@ catch:
*
* @param[in] h clicon handle
* @param[in] xn Sub-tree (under xorig) at child of rpc: .
- * @param[out] cb Output xml stream. For reply
- * @param[out] cb_err Error xml stream. For error reply
* @param[out] xret Return XML, error or OK
*
* @retval -1 Error
diff --git a/apps/netconf/netconf_rpc.c b/apps/netconf/netconf_rpc.c
index 80a92834..b63af86c 100644
--- a/apps/netconf/netconf_rpc.c
+++ b/apps/netconf/netconf_rpc.c
@@ -77,8 +77,6 @@
/*! Get configuration
* @param[in] h Clicon handle
* @param[in] xn Sub-tree (under xorig) at ... level.
- * @param[out] cb Output xml stream. For reply
- * @param[out] cb_err Error xml stream. For error reply
* @param[out] xret Return XML, error or OK
* @note filter type subtree and xpath is supported, but xpath is preferred, and
* better performance and tested. Please use xpath.
diff --git a/lib/clixon/clixon_string.h b/lib/clixon/clixon_string.h
index 7537a799..55ec7a6f 100644
--- a/lib/clixon/clixon_string.h
+++ b/lib/clixon/clixon_string.h
@@ -56,6 +56,7 @@ static inline char * strdup4(char *str)
*/
char **clicon_sepsplit (char *string, char *delim, int *nvec, const char *label);
char **clicon_strsplit (char *string, char *delim, int *nvec, const char *label);
+char **clicon_strsep(char *string, char *delim, int *nvec0);
char *clicon_strjoin (int argc, char **argv, char *delim, const char *label);
char *clicon_strtrim(char *str, const char *label);
int clicon_sep(char *s, const char sep[2], const char *label, char**a0, char **b0);
diff --git a/lib/src/clixon_string.c b/lib/src/clixon_string.c
index 611c4d27..139fdeff 100644
--- a/lib/src/clixon_string.c
+++ b/lib/src/clixon_string.c
@@ -69,6 +69,7 @@
* @retval NULL Error
* @see clicon_strsplit Operates on full string delimiters rather than
* individual character delimiters.
+ * @see clicon_strsep Use malloc instead of chunk
*/
char **
clicon_sepsplit (char *string,
@@ -111,8 +112,6 @@ clicon_sepsplit (char *string,
* the full delimiter string. The matched delimiters are not part of the
* resulting vector.
*
- * See also clicon_sepsplit() which is similar
- *
* The vector returned is one single memory chunk that must be unchunked
* by the caller
*
@@ -124,6 +123,7 @@ clicon_sepsplit (char *string,
* @retval NULL Error
* @see clicon_sepsplit Operates on individual character delimiters rather
* than full string delimiter.
+ * @see clicon_strsep Use malloc instead of chunk
*/
char **
clicon_strsplit (char *string,
@@ -165,6 +165,50 @@ clicon_strsplit (char *string,
return vec;
}
+/*! Split string into a vector based on character delimiters. Using malloc
+ *
+ * The given string is split into a vector where the delimiter can be
+ * any of the characters in the specified delimiter string.
+ *
+ * The vector returned is one single memory block that must be freed
+ * by the caller
+ *
+ * @param[in] string String to be split
+ * @param[in] delim String of delimiter characters
+ * @param[out] nvec Number of entries in returned vector
+ * @retval vec Vector of strings. Free after use
+ * @retval NULL Error *
+ */
+char **
+clicon_strsep(char *string,
+ char *delim,
+ int *nvec0)
+{
+ char **vec = NULL;
+ char *ptr;
+ char *p;
+ int nvec = 1;
+ int i;
+
+ for (i=0; i