- 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:
Olof hagsand 2021-04-19 09:39:07 +02:00
parent 7ebb538ebf
commit b88722fa25
29 changed files with 557 additions and 345 deletions

View file

@ -300,13 +300,13 @@ backend_plugin_restconf_register(clicon_handle h,
yang_stmt *yspec)
{
int retval = -1;
clixon_plugin *cp = NULL;
clixon_plugin_t *cp = NULL;
if (clixon_pseudo_plugin(h, "restconf pseudo plugin", &cp) < 0)
goto done;
cp->cp_api.ca_trans_validate = restconf_pseudo_process_validate;
cp->cp_api.ca_trans_commit = restconf_pseudo_process_commit;
clixon_plugin_api_get(cp)->ca_trans_validate = restconf_pseudo_process_validate;
clixon_plugin_api_get(cp)->ca_trans_commit = restconf_pseudo_process_commit;
/* Register generic process-control of restconf daemon, ie start/stop restconf */
if (restconf_pseudo_process_control(h) < 0)