New feature: [Customized NETCONF error message](https://github.com/clicon/clixon/issues/454)

* Added new callback `.ca_errmsg`
* Changed signature of `clicon_netconf_error()` and `netconf_err2cb()`
This commit is contained in:
Olof hagsand 2023-10-26 14:35:39 +02:00
parent e7313fc9a2
commit 5bdad1870e
25 changed files with 258 additions and 122 deletions

View file

@ -1214,7 +1214,7 @@ snmp_table_getnext(clicon_handle h,
if (clicon_rpc_get(h, xpath, nsc, CONTENT_ALL, -1, NULL, &xt) < 0)
goto done;
if ((xerr = xpath_first(xt, NULL, "/rpc-error")) != NULL){
clixon_netconf_error(xerr, "clicon_rpc_get", NULL);
clixon_netconf_error(h, xerr, "clicon_rpc_get", NULL);
goto done;
}
if ((xtable = xpath_first(xt, nsc, "%s", xpath)) != NULL) {

View file

@ -491,7 +491,7 @@ mibyang_table_poll(clicon_handle h,
if (clicon_rpc_get(h, xpath, nsc, CONTENT_ALL, -1, NULL, &xt) < 0)
goto done;
if ((xerr = xpath_first(xt, NULL, "/rpc-error")) != NULL){
clixon_netconf_error(xerr, "clicon_rpc_get", NULL);
clixon_netconf_error(h, xerr, "clicon_rpc_get", NULL);
goto done;
}
if ((xtable = xpath_first(xt, nsc, "%s", xpath)) != NULL) {