aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/tnc_ifmap
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2011-08-08 08:48:18 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-08-10 09:29:34 +0200
commit8c78772a0598619b7bc5197662ee1c8a0703f7d0 (patch)
tree24ca7b804502c47444e4a44d64e2ce8e6de2dd87 /src/libcharon/plugins/tnc_ifmap
parentcc7cfbc16efa6c522184037933a0566a17ec1904 (diff)
downloadstrongswan-8c78772a0598619b7bc5197662ee1c8a0703f7d0.tar.bz2
strongswan-8c78772a0598619b7bc5197662ee1c8a0703f7d0.tar.xz
implemented tnc-ifmap reload method
Diffstat (limited to 'src/libcharon/plugins/tnc_ifmap')
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c
index 8708b90a9..6c97a5a1c 100644
--- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c
@@ -42,6 +42,25 @@ METHOD(plugin_t, get_name, char*,
return "tnc-ifmap";
}
+METHOD(plugin_t, reload, bool,
+ private_tnc_ifmap_plugin_t *this)
+{
+ if (this->listener)
+ {
+ charon->bus->remove_listener(charon->bus, &this->listener->listener);
+ this->listener->destroy(this->listener);
+ }
+
+ this->listener = tnc_ifmap_listener_create();
+ if (!this->listener)
+ {
+ return FALSE;
+ }
+
+ charon->bus->add_listener(charon->bus, &this->listener->listener);
+ return TRUE;
+}
+
METHOD(plugin_t, destroy, void,
private_tnc_ifmap_plugin_t *this)
{
@@ -64,7 +83,7 @@ plugin_t *tnc_ifmap_plugin_create()
.public = {
.plugin = {
.get_name = _get_name,
- .reload = (void*)return_false,
+ .reload = _reload,
.destroy = _destroy,
},
},