diff options
author | Martin Willi <martin@strongswan.org> | 2006-03-23 15:25:43 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-03-23 15:25:43 +0000 |
commit | dec598220b9a293c4ec75e593ab642a8945fa4fc (patch) | |
tree | a97247afbdb29e2b071933f8c9667a7ffa03cca3 /Source/charon/threads/thread_pool.c | |
parent | 3264ce50b912f2aba09d2d8e7ee7ed9d364d9e46 (diff) | |
download | strongswan-dec598220b9a293c4ec75e593ab642a8945fa4fc.tar.bz2 strongswan-dec598220b9a293c4ec75e593ab642a8945fa4fc.tar.xz |
- rewrite of logger_manager, uses now one instance per context
- cleanups for logger here and there
- removed critical flag check in payload verification (conformance to IKEv2)
- so thats and theres everywere... ;-)
Diffstat (limited to 'Source/charon/threads/thread_pool.c')
-rw-r--r-- | Source/charon/threads/thread_pool.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/Source/charon/threads/thread_pool.c b/Source/charon/threads/thread_pool.c index f3e2fd8e6..1f1584ec3 100644 --- a/Source/charon/threads/thread_pool.c +++ b/Source/charon/threads/thread_pool.c @@ -296,11 +296,7 @@ static void process_incoming_packet_job(private_thread_pool_t *this, incoming_pa this->create_delete_half_open_ike_sa_job(this,ike_sa_id,charon->configuration->get_half_open_ike_sa_timeout(charon->configuration)); } - status = ike_sa->process_message(ike_sa, message); - if ((status != SUCCESS) && (status != DELETE_ME)) - { - this->worker_logger->log(this->worker_logger, ERROR, "Message could not be processed by IKE SA"); - } + status = ike_sa->process_message(ike_sa, message); this->worker_logger->log(this->worker_logger, CONTROL|LEVEL3, "%s IKE SA %lld:%lld, role %s", (status == DELETE_ME) ? "Checkin and delete" : "Checkin", @@ -558,8 +554,6 @@ static void destroy(private_thread_pool_t *this) } /* free mem */ - charon->logger_manager->destroy_logger(charon->logger_manager, this->pool_logger); - charon->logger_manager->destroy_logger(charon->logger_manager, this->worker_logger); allocator_free(this->threads); allocator_free(this); } @@ -589,9 +583,9 @@ thread_pool_t *thread_pool_create(size_t pool_size) this->threads = allocator_alloc(sizeof(pthread_t) * pool_size); - this->pool_logger = charon->logger_manager->create_logger(charon->logger_manager,THREAD_POOL,NULL); + this->pool_logger = charon->logger_manager->get_logger(charon->logger_manager, THREAD_POOL); - this->worker_logger = charon->logger_manager->create_logger(charon->logger_manager,WORKER,NULL); + this->worker_logger = charon->logger_manager->get_logger(charon->logger_manager, WORKER); /* try to create as many threads as possible, up tu pool_size */ for (current = 0; current < pool_size; current++) @@ -606,8 +600,6 @@ thread_pool_t *thread_pool_create(size_t pool_size) if (current == 0) { this->pool_logger->log(this->pool_logger, ERROR, "Could not create any thread"); - charon->logger_manager->destroy_logger(charon->logger_manager, this->pool_logger); - charon->logger_manager->destroy_logger(charon->logger_manager, this->worker_logger); allocator_free(this->threads); allocator_free(this); return NULL; |