Properly initialize the UCI plugin.
[strongswan.git] / src / libcharon / plugins / uci / uci_plugin.c
index 6d6d5d2..497c473 100644 (file)
@@ -58,6 +58,12 @@ struct private_uci_plugin_t {
        uci_control_t *control;
 };
 
+METHOD(plugin_t, get_name, char*,
+       private_uci_plugin_t *this)
+{
+       return "uci";
+}
+
 METHOD(plugin_t, destroy, void,
        private_uci_plugin_t *this)
 {
@@ -80,14 +86,16 @@ plugin_t *uci_plugin_create()
        INIT(this,
                .public = {
                        .plugin = {
+                               .get_name = _get_name,
+                               .reload = (void*)return_false,
                                .destroy = _destroy,
                        },
                },
                .parser = uci_parser_create(UCI_PACKAGE),
-               .config = uci_config_create(this->parser),
-               .creds = uci_creds_create(this->parser),
                .control = uci_control_create(),
        );
+       this->config = uci_config_create(this->parser);
+       this->creds = uci_creds_create(this->parser);
 
        charon->backends->add_backend(charon->backends, &this->config->backend);
        lib->credmgr->add_set(lib->credmgr, &this->creds->credential_set);