diff options
author | Martin Willi <martin@revosec.ch> | 2011-04-11 16:41:25 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2011-04-15 10:07:12 +0200 |
commit | 6e2791715b7534b601ff5d5163d63d88ad7a8a5e (patch) | |
tree | 2228f68dd17886b3a8b6bb3a2db2ae92a26570d9 /src/libcharon/plugins/eap_mschapv2/eap_mschapv2_plugin.c | |
parent | 2b36342551c4d14da6eb29295ebdd60978a2d563 (diff) | |
download | strongswan-6e2791715b7534b601ff5d5163d63d88ad7a8a5e.tar.bz2 strongswan-6e2791715b7534b601ff5d5163d63d88ad7a8a5e.tar.xz |
Migrated remaining plugin_t implementations to INIT/METHOD macros
Diffstat (limited to 'src/libcharon/plugins/eap_mschapv2/eap_mschapv2_plugin.c')
-rw-r--r-- | src/libcharon/plugins/eap_mschapv2/eap_mschapv2_plugin.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libcharon/plugins/eap_mschapv2/eap_mschapv2_plugin.c b/src/libcharon/plugins/eap_mschapv2/eap_mschapv2_plugin.c index a7b41ddbf..f8130e6a4 100644 --- a/src/libcharon/plugins/eap_mschapv2/eap_mschapv2_plugin.c +++ b/src/libcharon/plugins/eap_mschapv2/eap_mschapv2_plugin.c @@ -19,10 +19,8 @@ #include <daemon.h> -/** - * Implementation of plugin_t.destroy - */ -static void destroy(eap_mschapv2_plugin_t *this) +METHOD(plugin_t, destroy, void, + eap_mschapv2_plugin_t *this) { charon->eap->remove_method(charon->eap, (eap_constructor_t)eap_mschapv2_create_server); @@ -36,9 +34,13 @@ static void destroy(eap_mschapv2_plugin_t *this) */ plugin_t *eap_mschapv2_plugin_create() { - eap_mschapv2_plugin_t *this = malloc_thing(eap_mschapv2_plugin_t); + eap_mschapv2_plugin_t *this; - this->plugin.destroy = (void(*)(plugin_t*))destroy; + INIT(this, + .plugin = { + .destroy = _destroy, + }, + ); charon->eap->add_method(charon->eap, EAP_MSCHAPV2, 0, EAP_SERVER, (eap_constructor_t)eap_mschapv2_create_server); |