diff options
author | Martin Willi <martin@revosec.ch> | 2010-07-22 11:42:22 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-07-26 10:15:17 +0200 |
commit | 00c1bd06060dc72ad24e9010c477a97ceafe129f (patch) | |
tree | 4c83cb29b7e1b5ff351e56370278968f48f68138 /src/libcharon/plugins/ha/ha_plugin.c | |
parent | c74c4c2a200b7a5984ab6213e3bc76d2ccf0239b (diff) | |
download | strongswan-00c1bd06060dc72ad24e9010c477a97ceafe129f.tar.bz2 strongswan-00c1bd06060dc72ad24e9010c477a97ceafe129f.tar.xz |
Migrated ha plugin to INIT/METHOD macros
Diffstat (limited to 'src/libcharon/plugins/ha/ha_plugin.c')
-rw-r--r-- | src/libcharon/plugins/ha/ha_plugin.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/libcharon/plugins/ha/ha_plugin.c b/src/libcharon/plugins/ha/ha_plugin.c index ea255c8ab..70daca0bf 100644 --- a/src/libcharon/plugins/ha/ha_plugin.c +++ b/src/libcharon/plugins/ha/ha_plugin.c @@ -78,10 +78,8 @@ struct private_ha_plugin_t { ha_ctl_t *ctl; }; -/** - * Implementation of plugin_t.destroy - */ -static void destroy(private_ha_plugin_t *this) +METHOD(plugin_t, destroy, void, + private_ha_plugin_t *this) { DESTROY_IF(this->ctl); charon->bus->remove_listener(charon->bus, &this->segments->listener); @@ -127,11 +125,9 @@ plugin_t *ha_plugin_create() return NULL; } - this = malloc_thing(private_ha_plugin_t); - - this->public.plugin.destroy = (void(*)(plugin_t*))destroy; - this->tunnel = NULL; - this->ctl = NULL; + INIT(this, + .public.plugin.destroy = _destroy, + ); if (secret) { |