aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-06-07 18:16:08 +0200
committerTobias Brunner <tobias@strongswan.org>2013-06-11 11:18:18 +0200
commitd895721489fd76a9bcc5ce96eeb5a5f1a409291c (patch)
tree9e6545062edb6df0cb329ba09e1cc739a3a70275 /src
parentf5bd1a5e09e43d81b6a2f0a3c7b501f0ee864796 (diff)
downloadstrongswan-d895721489fd76a9bcc5ce96eeb5a5f1a409291c.tar.bz2
strongswan-d895721489fd76a9bcc5ce96eeb5a5f1a409291c.tar.xz
unbound: Use plugin features and provide RESOLVER
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/plugins/unbound/unbound_plugin.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libstrongswan/plugins/unbound/unbound_plugin.c b/src/libstrongswan/plugins/unbound/unbound_plugin.c
index 90b95330a..f727cdaae 100644
--- a/src/libstrongswan/plugins/unbound/unbound_plugin.c
+++ b/src/libstrongswan/plugins/unbound/unbound_plugin.c
@@ -37,10 +37,20 @@ METHOD(plugin_t, get_name, char*,
return "unbound";
}
+METHOD(plugin_t, get_features, int,
+ private_unbound_plugin_t *this, plugin_feature_t *features[])
+{
+ static plugin_feature_t f[] = {
+ PLUGIN_REGISTER(RESOLVER, unbound_resolver_create),
+ PLUGIN_PROVIDE(RESOLVER),
+ };
+ *features = f;
+ return countof(f);
+}
+
METHOD(plugin_t, destroy, void,
private_unbound_plugin_t *this)
{
- lib->resolver->remove_resolver(lib->resolver, unbound_resolver_create);
free(this);
}
@@ -55,12 +65,11 @@ plugin_t *unbound_plugin_create()
.public = {
.plugin = {
.get_name = _get_name,
+ .get_features = _get_features,
.destroy = _destroy,
},
},
);
- lib->resolver->add_resolver(lib->resolver, unbound_resolver_create);
-
return &this->public.plugin;
}