session CHANGE init/destroy functions unified
There is one init/destroy for client
and one for server, nothing else needs
to be called.
diff --git a/src/session_server.c b/src/session_server.c
index e904cb8..8e3aade 100644
--- a/src/session_server.c
+++ b/src/session_server.c
@@ -326,6 +326,8 @@
return -1;
}
+ nc_init();
+
/* set default <get-schema> callback if not specified */
rpc = ly_ctx_get_node(ctx, "/ietf-netconf-monitoring:get-schema");
if (rpc && !rpc->private) {
@@ -354,6 +356,7 @@
#if defined(NC_ENABLED_SSH) || defined(NC_ENABLED_TLS)
nc_server_del_endpt(NULL, 0);
#endif
+ nc_destroy();
}
API int