Plugin RPC callback interface have been unified between backend, netconf and restconf.

* Backend RPC register callback function (Netconf RPC or restconf operation POST) has been changed from: `backend_rpc_cb_register()` to `rpc_callback_register()`
    * Backend RPC callback signature has been changed from: `int cb(clicon_handle h, cxobj *xe, struct client_entry *ce, cbuf *cbret, void *arg)` has been changed to : `int cb(clicon_handle h, cxobj *xe, struct client_entry *ce, cbuf *cbret, void *arg)`
    * Frontend netconf and restconf plugins can register callbacks as well with same API as backends.
This commit is contained in:
Olof hagsand 2018-04-07 18:20:33 +02:00
parent 7a4371e76f
commit d541c49c6f
20 changed files with 323 additions and 229 deletions

View file

@ -262,6 +262,8 @@ netconf_terminate(clicon_handle h)
{
yang_spec *yspec;
clixon_plugin_exit(h);
rpc_callback_delete_all();
clicon_rpc_close_session(h);
if ((yspec = clicon_dbspec_yang(h)) != NULL)
yspec_free(yspec);
@ -402,7 +404,6 @@ main(int argc,
if (event_loop() < 0)
goto done;
done:
clixon_plugin_exit(h);
netconf_terminate(h);
clicon_log_init(__PROGRAM__, LOG_INFO, 0); /* Log on syslog no stderr */
clicon_log(LOG_NOTICE, "%s: %u Terminated\n", __PROGRAM__, getpid());