Migrated remaining plugin_t implementations to INIT/METHOD macros

This commit is contained in:
Martin Willi
2011-04-15 10:07:12 +02:00
parent 2b36342551
commit 6e2791715b
18 changed files with 188 additions and 133 deletions
@@ -20,10 +20,8 @@
#include <daemon.h>
/**
* Implementation of plugin_t.destroy
*/
static void destroy(eap_aka_plugin_t *this)
METHOD(plugin_t, destroy, void,
eap_aka_plugin_t *this)
{
charon->eap->remove_method(charon->eap,
(eap_constructor_t)eap_aka_server_create);
@@ -37,9 +35,13 @@ static void destroy(eap_aka_plugin_t *this)
*/
plugin_t *eap_aka_plugin_create()
{
eap_aka_plugin_t *this = malloc_thing(eap_aka_plugin_t);
eap_aka_plugin_t *this;
this->plugin.destroy = (void(*)(plugin_t*))destroy;
INIT(this,
.plugin = {
.destroy = _destroy,
},
);
charon->eap->add_method(charon->eap, EAP_AKA, 0, EAP_SERVER,
(eap_constructor_t)eap_aka_server_create);