- Restructure plugin module using a "module struct" rather than global variables.
This include plugin module init and exit functions New type: clixon_plugin_t exposed via public API while struct clixon_plugin is private - Makefile changes for static linkage using "LINKAGE=static" - Moved nacm external init to later stage in backend_main
This commit is contained in:
parent
7ebb538ebf
commit
b88722fa25
29 changed files with 557 additions and 345 deletions
|
|
@ -584,8 +584,9 @@ netconf_terminate(clicon_handle h)
|
|||
cvec *nsctx;
|
||||
cxobj *x;
|
||||
|
||||
clixon_plugin_exit_all(h);
|
||||
rpc_callback_delete_all(h);
|
||||
/* Delete all plugins, and RPC callbacks */
|
||||
clixon_plugin_module_exit(h);
|
||||
|
||||
clicon_rpc_close_session(h);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
ys_free(yspec);
|
||||
|
|
@ -796,6 +797,10 @@ main(int argc,
|
|||
if (netconf_module_features(h) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialize plugin module by creating a handle holding plugin and callback lists */
|
||||
if (clixon_plugin_module_init(h) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create top-level yang spec and store as option */
|
||||
if ((yspec = yspec_new()) == NULL)
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue