aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/openconfig/openconfig_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/openconfig/openconfig_plugin.c')
-rw-r--r--src/plugins/openconfig/openconfig_plugin.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/openconfig/openconfig_plugin.c b/src/plugins/openconfig/openconfig_plugin.c
index 5d5582a..a47d687 100644
--- a/src/plugins/openconfig/openconfig_plugin.c
+++ b/src/plugins/openconfig/openconfig_plugin.c
@@ -263,3 +263,19 @@ void openconfig_unsubscribe(plugin_main_t* plugin_main)
} while (plugin_subcscription != NULL);
}
}
+
+plugin_main_t plugin_main;
+
+int openconfig_plugin_init(sr_session_ctx_t* session)
+{
+ memset((void*) &plugin_main, 0, sizeof(plugin_main));
+
+ plugin_main.ds_running = session;
+
+ openconfig_register_subscribe(&plugin_main);
+}
+
+void openconfig_plugin_cleanup()
+{
+ openconfig_register_subscribe(&plugin_main);
+}