Migrated remaining plugin_t implementations to INIT/METHOD macros
This commit is contained in:
@@ -42,10 +42,8 @@ struct private_eap_simaka_pseudonym_t {
|
||||
eap_simaka_pseudonym_provider_t *provider;
|
||||
};
|
||||
|
||||
/**
|
||||
* Implementation of eap_simaka_pseudonym_t.destroy.
|
||||
*/
|
||||
static void destroy(private_eap_simaka_pseudonym_t *this)
|
||||
METHOD(plugin_t, destroy, void,
|
||||
private_eap_simaka_pseudonym_t *this)
|
||||
{
|
||||
charon->sim->remove_card(charon->sim, &this->card->card);
|
||||
charon->sim->remove_provider(charon->sim, &this->provider->provider);
|
||||
@@ -61,11 +59,15 @@ plugin_t *eap_simaka_pseudonym_plugin_create()
|
||||
{
|
||||
private_eap_simaka_pseudonym_t *this;
|
||||
|
||||
this = malloc_thing(private_eap_simaka_pseudonym_t);
|
||||
INIT(this,
|
||||
.public = {
|
||||
.plugin = {
|
||||
.destroy = _destroy,
|
||||
},
|
||||
},
|
||||
.provider = eap_simaka_pseudonym_provider_create(),
|
||||
);
|
||||
|
||||
this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
|
||||
|
||||
this->provider = eap_simaka_pseudonym_provider_create();
|
||||
if (!this->provider)
|
||||
{
|
||||
free(this);
|
||||
|
||||
Reference in New Issue
Block a user