- 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... ;-)
This commit is contained in:
Martin Willi
2006-03-23 15:25:43 +00:00
parent 3264ce50b9
commit dec598220b
59 changed files with 461 additions and 762 deletions
+1 -4
View File
@@ -102,8 +102,6 @@ static void destroy(private_receiver_t *this)
pthread_join(this->assigned_thread, NULL);
this->logger->log(this->logger, CONTROL | LEVEL1, "Receiver thread terminated");
charon->logger_manager->destroy_logger(charon->logger_manager, this->logger);
allocator_free(this);
}
@@ -118,12 +116,11 @@ receiver_t * receiver_create()
this->public.destroy = (void(*)(receiver_t*)) destroy;
this->receive_packets = receive_packets;
this->logger = charon->logger_manager->create_logger(charon->logger_manager, RECEIVER, NULL);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, RECEIVER);
if (pthread_create(&(this->assigned_thread), NULL, (void*(*)(void*))this->receive_packets, this) != 0)
{
this->logger->log(this->logger, ERROR, "Receiver thread could not be started");
charon->logger_manager->destroy_logger(charon->logger_manager, this->logger);
allocator_free(this);
charon->kill(charon, "Unable to create receiver thread");
}