aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/threads
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-24 16:57:53 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-24 16:57:53 +0000
commit207dd9b5c0135026ccd04a0596a8f9875565b0ac (patch)
treeb6f0e70d72889f19035f1a9154b6707bdfd7025b /Source/charon/threads
parent852e8b6f259af3233844af6aa6413bf3cc8ed237 (diff)
downloadstrongswan-207dd9b5c0135026ccd04a0596a8f9875565b0ac.tar.bz2
strongswan-207dd9b5c0135026ccd04a0596a8f9875565b0ac.tar.xz
- added function create_and_checkout to the ike_sa_manager_t
Diffstat (limited to 'Source/charon/threads')
-rw-r--r--Source/charon/threads/thread_pool.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/Source/charon/threads/thread_pool.c b/Source/charon/threads/thread_pool.c
index 7cf802bda..1ed3a20b5 100644
--- a/Source/charon/threads/thread_pool.c
+++ b/Source/charon/threads/thread_pool.c
@@ -192,27 +192,14 @@ static void job_processing(private_thread_pool_t *this)
* - call initiate_connection on this sa
*/
initiate_ike_sa_job_t *initiate_job;
- ike_sa_id_t *ike_sa_id;
ike_sa_t *ike_sa;
status_t status;
initiate_job = (initiate_ike_sa_job_t *)job;
+
+ this->worker_logger->log(this->worker_logger, CONTROL|MOST, "create and checking out IKE SA");
- ike_sa_id = ike_sa_id_create(0, 0, TRUE);
- if (ike_sa_id == NULL)
- {
- this->worker_logger->log(this->worker_logger, ERROR, "%s by creating ike_sa_id_t, job rejected.",
- mapping_find(status_m, status));
- break;
- }
-
- this->worker_logger->log(this->worker_logger, CONTROL|MOST, "checking out IKE SA %lld:%lld, role %s",
- ike_sa_id->get_initiator_spi(ike_sa_id),
- ike_sa_id->get_responder_spi(ike_sa_id),
- ike_sa_id->is_initiator(ike_sa_id) ? "initiator" : "responder");
-
- status = global_ike_sa_manager->checkout(global_ike_sa_manager, ike_sa_id, &ike_sa);
- ike_sa_id->destroy(ike_sa_id);
+ status = global_ike_sa_manager->create_and_checkout(global_ike_sa_manager, &ike_sa);
if (status != SUCCESS)
{
this->worker_logger->log(this->worker_logger, ERROR, "%s by checking out new IKE_SA, job rejected.",