summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/sqlite/sqlite_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/sqlite/sqlite_plugin.c')
-rw-r--r--src/libstrongswan/plugins/sqlite/sqlite_plugin.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/libstrongswan/plugins/sqlite/sqlite_plugin.c b/src/libstrongswan/plugins/sqlite/sqlite_plugin.c
index d8c6a560c..f554a9e4f 100644
--- a/src/libstrongswan/plugins/sqlite/sqlite_plugin.c
+++ b/src/libstrongswan/plugins/sqlite/sqlite_plugin.c
@@ -37,11 +37,20 @@ METHOD(plugin_t, get_name, char*,
return "sqlite";
}
+METHOD(plugin_t, get_features, int,
+ private_sqlite_plugin_t *this, plugin_feature_t *features[])
+{
+ static plugin_feature_t f[] = {
+ PLUGIN_REGISTER(DATABASE, sqlite_database_create),
+ PLUGIN_PROVIDE(DATABASE, DB_SQLITE),
+ };
+ *features = f;
+ return countof(f);
+}
+
METHOD(plugin_t, destroy, void,
private_sqlite_plugin_t *this)
{
- lib->db->remove_database(lib->db,
- (database_constructor_t)sqlite_database_create);
free(this);
}
@@ -56,15 +65,12 @@ plugin_t *sqlite_plugin_create()
.public = {
.plugin = {
.get_name = _get_name,
- .reload = (void*)return_false,
+ .get_features = _get_features,
.destroy = _destroy,
},
},
);
- lib->db->add_database(lib->db,
- (database_constructor_t)sqlite_database_create);
-
return &this->public.plugin;
}