Migrated remaining plugin_t implementations to INIT/METHOD macros
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user