diff options
Diffstat (limited to 'src/libcharon/processing/jobs/migrate_job.c')
-rw-r--r-- | src/libcharon/processing/jobs/migrate_job.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libcharon/processing/jobs/migrate_job.c b/src/libcharon/processing/jobs/migrate_job.c index 05f47340c..7ddd0a82b 100644 --- a/src/libcharon/processing/jobs/migrate_job.c +++ b/src/libcharon/processing/jobs/migrate_job.c @@ -57,10 +57,15 @@ struct private_migrate_job_t { host_t *remote; }; +<<<<<<< HEAD /** * Implementation of job_t.destroy. */ static void destroy(private_migrate_job_t *this) +======= +METHOD(job_t, destroy, void, + private_migrate_job_t *this) +>>>>>>> upstream/4.5.1 { DESTROY_IF(this->src_ts); DESTROY_IF(this->dst_ts); @@ -69,10 +74,15 @@ static void destroy(private_migrate_job_t *this) free(this); } +<<<<<<< HEAD /** * Implementation of job_t.execute. */ static void execute(private_migrate_job_t *this) +======= +METHOD(job_t, execute, void, + private_migrate_job_t *this) +>>>>>>> upstream/4.5.1 { ike_sa_t *ike_sa = NULL; @@ -133,6 +143,7 @@ migrate_job_t *migrate_job_create(u_int32_t reqid, policy_dir_t dir, host_t *local, host_t *remote) { +<<<<<<< HEAD private_migrate_job_t *this = malloc_thing(private_migrate_job_t); /* interface functions */ @@ -145,6 +156,23 @@ migrate_job_t *migrate_job_create(u_int32_t reqid, this->dst_ts = (dir == POLICY_OUT) ? dst_ts : src_ts; this->local = local; this->remote = remote; +======= + private_migrate_job_t *this; + + INIT(this, + .public = { + .job_interface = { + .execute = _execute, + .destroy = _destroy, + }, + }, + .reqid = reqid, + .src_ts = (dir == POLICY_OUT) ? src_ts : dst_ts, + .dst_ts = (dir == POLICY_OUT) ? dst_ts : src_ts, + .local = local, + .remote = remote, + ); +>>>>>>> upstream/4.5.1 return &this->public; } |