diff options
Diffstat (limited to 'Source/charon/threads/scheduler.c')
-rw-r--r-- | Source/charon/threads/scheduler.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/charon/threads/scheduler.c b/Source/charon/threads/scheduler.c index 8205cfd45..8750cdae9 100644 --- a/Source/charon/threads/scheduler.c +++ b/Source/charon/threads/scheduler.c @@ -96,9 +96,7 @@ static void destroy(private_scheduler_t *this) pthread_cancel(this->assigned_thread); pthread_join(this->assigned_thread, NULL); - this->logger->log(this->logger, CONTROL | LEVEL1, "Scheduler thread terminated"); - - charon->logger_manager->destroy_logger(charon->logger_manager, this->logger); + this->logger->log(this->logger, CONTROL | LEVEL1, "Scheduler thread terminated"); allocator_free(this); } @@ -113,13 +111,12 @@ scheduler_t * scheduler_create() this->public.destroy = (void(*)(scheduler_t*)) destroy; this->get_events = get_events; - this->logger = charon->logger_manager->create_logger(charon->logger_manager, SCHEDULER, NULL); + this->logger = charon->logger_manager->get_logger(charon->logger_manager, SCHEDULER); if (pthread_create(&(this->assigned_thread), NULL, (void*(*)(void*))this->get_events, this) != 0) { /* thread could not be created */ this->logger->log(this->logger, ERROR, "Scheduler thread could not be created!"); - charon->logger_manager->destroy_logger(charon->logger_manager, this->logger); allocator_free(this); charon->kill(charon, "Unable to create scheduler thread"); } |