diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-11-25 23:06:20 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-11-25 23:06:20 +0100 |
commit | c6753bd4a7e3311de58b541d24ec27a9a447b37f (patch) | |
tree | d1ca39281217585e4710526a6f5bbadc6d40d820 /src | |
parent | a76ad383651e7de57b872ad2261b07a8bfbb1da2 (diff) | |
download | strongswan-c6753bd4a7e3311de58b541d24ec27a9a447b37f.tar.bz2 strongswan-c6753bd4a7e3311de58b541d24ec27a9a447b37f.tar.xz |
Migrated kernel_klips_plugin_t to INIT/METHOD macros
Diffstat (limited to 'src')
-rw-r--r-- | src/libhydra/plugins/kernel_klips/kernel_klips_plugin.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libhydra/plugins/kernel_klips/kernel_klips_plugin.c b/src/libhydra/plugins/kernel_klips/kernel_klips_plugin.c index 1a22835c0..9ec3316ff 100644 --- a/src/libhydra/plugins/kernel_klips/kernel_klips_plugin.c +++ b/src/libhydra/plugins/kernel_klips/kernel_klips_plugin.c @@ -32,10 +32,8 @@ struct private_kernel_klips_plugin_t { kernel_klips_plugin_t public; }; -/** - * Implementation of plugin_t.destroy - */ -static void destroy(private_kernel_klips_plugin_t *this) +METHOD(plugin_t, destroy, void, + private_kernel_klips_plugin_t *this) { hydra->kernel_interface->remove_ipsec_interface(hydra->kernel_interface, (kernel_ipsec_constructor_t)kernel_klips_ipsec_create); @@ -49,8 +47,13 @@ plugin_t *kernel_klips_plugin_create() { private_kernel_klips_plugin_t *this = malloc_thing(private_kernel_klips_plugin_t); - this->public.plugin.destroy = (void(*)(plugin_t*))destroy; - + INIT(this, + .public = { + .plugin = { + .destroy = _destroy, + } + } + ); hydra->kernel_interface->add_ipsec_interface(hydra->kernel_interface, (kernel_ipsec_constructor_t)kernel_klips_ipsec_create); |