Migrated roam_job_t to INIT/METHOD macros
This commit is contained in:
@@ -38,18 +38,14 @@ struct private_roam_job_t {
|
|||||||
bool address;
|
bool address;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
METHOD(job_t, destroy, void,
|
||||||
* Implements job_t.destroy.
|
private_roam_job_t *this)
|
||||||
*/
|
|
||||||
static void destroy(private_roam_job_t *this)
|
|
||||||
{
|
{
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
METHOD(job_t, execute, void,
|
||||||
* Implementation of job_t.execute.
|
private_roam_job_t *this)
|
||||||
*/
|
|
||||||
static void execute(private_roam_job_t *this)
|
|
||||||
{
|
{
|
||||||
ike_sa_t *ike_sa;
|
ike_sa_t *ike_sa;
|
||||||
linked_list_t *list;
|
linked_list_t *list;
|
||||||
@@ -94,12 +90,17 @@ static void execute(private_roam_job_t *this)
|
|||||||
*/
|
*/
|
||||||
roam_job_t *roam_job_create(bool address)
|
roam_job_t *roam_job_create(bool address)
|
||||||
{
|
{
|
||||||
private_roam_job_t *this = malloc_thing(private_roam_job_t);
|
private_roam_job_t *this;
|
||||||
|
|
||||||
this->public.job_interface.execute = (void (*) (job_t *)) execute;
|
INIT(this,
|
||||||
this->public.job_interface.destroy = (void (*) (job_t *)) destroy;
|
.public = {
|
||||||
|
.job_interface = {
|
||||||
this->address = address;
|
.execute = _execute,
|
||||||
|
.destroy = _destroy,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
.address = address,
|
||||||
|
);
|
||||||
|
|
||||||
return &this->public;
|
return &this->public;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user