Migrated send_keepalive_job_t to INIT/METHOD macros
This commit is contained in:
@@ -38,19 +38,15 @@ struct private_send_keepalive_job_t {
|
|||||||
ike_sa_id_t *ike_sa_id;
|
ike_sa_id_t *ike_sa_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
METHOD(job_t, destroy, void,
|
||||||
* Implements job_t.destroy.
|
private_send_keepalive_job_t *this)
|
||||||
*/
|
|
||||||
static void destroy(private_send_keepalive_job_t *this)
|
|
||||||
{
|
{
|
||||||
this->ike_sa_id->destroy(this->ike_sa_id);
|
this->ike_sa_id->destroy(this->ike_sa_id);
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
METHOD(job_t, execute, void,
|
||||||
* Implementation of job_t.execute.
|
private_send_keepalive_job_t *this)
|
||||||
*/
|
|
||||||
static void execute(private_send_keepalive_job_t *this)
|
|
||||||
{
|
{
|
||||||
ike_sa_t *ike_sa;
|
ike_sa_t *ike_sa;
|
||||||
|
|
||||||
@@ -69,14 +65,17 @@ static void execute(private_send_keepalive_job_t *this)
|
|||||||
*/
|
*/
|
||||||
send_keepalive_job_t *send_keepalive_job_create(ike_sa_id_t *ike_sa_id)
|
send_keepalive_job_t *send_keepalive_job_create(ike_sa_id_t *ike_sa_id)
|
||||||
{
|
{
|
||||||
private_send_keepalive_job_t *this = malloc_thing(private_send_keepalive_job_t);
|
private_send_keepalive_job_t *this;
|
||||||
|
|
||||||
/* interface functions */
|
INIT(this,
|
||||||
this->public.job_interface.execute = (void (*) (job_t *)) execute;
|
.public = {
|
||||||
this->public.job_interface.destroy = (void (*) (job_t *)) destroy;
|
.job_interface = {
|
||||||
|
.execute = _execute,
|
||||||
/* private variables */
|
.destroy = _destroy,
|
||||||
this->ike_sa_id = ike_sa_id->clone(ike_sa_id);
|
},
|
||||||
|
},
|
||||||
|
.ike_sa_id = ike_sa_id->clone(ike_sa_id),
|
||||||
|
);
|
||||||
|
|
||||||
return &this->public;
|
return &this->public;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user