diff options
author | Martin Willi <martin@strongswan.org> | 2009-05-06 19:48:21 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-05-08 10:03:58 +0200 |
commit | 8c99451ae1ef9eff6730bcb913d3e862e29a74a2 (patch) | |
tree | 03b4fdfe5220fae81d7250f9b0de59e25660f186 /src/charon/processing | |
parent | eb8ed130afc7f8587da449b2bfaae721e1fe7881 (diff) | |
download | strongswan-8c99451ae1ef9eff6730bcb913d3e862e29a74a2.tar.bz2 strongswan-8c99451ae1ef9eff6730bcb913d3e862e29a74a2.tar.xz |
make use of the new trap-manager
Diffstat (limited to 'src/charon/processing')
-rw-r--r-- | src/charon/processing/jobs/acquire_job.c | 29 | ||||
-rw-r--r-- | src/charon/processing/jobs/acquire_job.h | 4 |
2 files changed, 7 insertions, 26 deletions
diff --git a/src/charon/processing/jobs/acquire_job.c b/src/charon/processing/jobs/acquire_job.c index 8e365697d..90b221b84 100644 --- a/src/charon/processing/jobs/acquire_job.c +++ b/src/charon/processing/jobs/acquire_job.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Martin Willi + * Copyright (C) 2006-2009 Martin Willi * Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it @@ -33,12 +33,12 @@ struct private_acquire_job_t { * reqid of the child to rekey */ u_int32_t reqid; - + /** * acquired source traffic selector */ traffic_selector_t *src_ts; - + /** * acquired destination traffic selector */ @@ -60,24 +60,8 @@ static void destroy(private_acquire_job_t *this) */ static void execute(private_acquire_job_t *this) { - ike_sa_t *ike_sa = NULL; - - if (this->reqid) - { - ike_sa = charon->ike_sa_manager->checkout_by_id(charon->ike_sa_manager, - this->reqid, TRUE); - } - if (ike_sa == NULL) - { - DBG1(DBG_JOB, "acquire job found no CHILD_SA with reqid {%d}", - this->reqid); - } - else - { - ike_sa->acquire(ike_sa, this->reqid); - - charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa); - } + charon->traps->acquire(charon->traps, this->reqid, + this->src_ts, this->dst_ts); destroy(this); } @@ -90,14 +74,13 @@ acquire_job_t *acquire_job_create(u_int32_t reqid, { private_acquire_job_t *this = malloc_thing(private_acquire_job_t); - /* interface functions */ this->public.job_interface.execute = (void (*) (job_t *)) execute; this->public.job_interface.destroy = (void (*)(job_t*)) destroy; - /* private variables */ this->reqid = reqid; this->src_ts = src_ts; this->dst_ts = dst_ts; return &this->public; } + diff --git a/src/charon/processing/jobs/acquire_job.h b/src/charon/processing/jobs/acquire_job.h index e9f523a87..a78e5274d 100644 --- a/src/charon/processing/jobs/acquire_job.h +++ b/src/charon/processing/jobs/acquire_job.h @@ -42,9 +42,7 @@ struct acquire_job_t { /** * Creates a job of type ACQUIRE. * - * We use the reqid to find the routed CHILD_SA. - * - * @param reqid reqid of the CHILD_SA to acquire + * @param reqid reqid of the trapped CHILD_SA to acquire * @param src_ts source traffic selector * @param dst_ts destination traffic selector * @return acquire_job_t object |