From 5113680f95e522c677cdd37072cfffbdca06831e Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 10 Apr 2006 08:07:38 +0000 Subject: - split up in libstrong, charon, stroke, testing done - new leak detective with malloc hook in library - useable, but needs improvements - logger_manager has now a single instance per library - allows use of loggers from any linking prog - a LOT of other things --- Source/charon/threads/receiver.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Source/charon/threads/receiver.c') diff --git a/Source/charon/threads/receiver.c b/Source/charon/threads/receiver.c index 9058ecbc4..0cf8b7bde 100644 --- a/Source/charon/threads/receiver.c +++ b/Source/charon/threads/receiver.c @@ -31,7 +31,6 @@ #include #include #include -#include #include @@ -103,7 +102,7 @@ static void destroy(private_receiver_t *this) pthread_join(this->assigned_thread, NULL); this->logger->log(this->logger, CONTROL | LEVEL1, "Receiver thread terminated"); - allocator_free(this); + free(this); } /* @@ -111,17 +110,17 @@ static void destroy(private_receiver_t *this) */ receiver_t * receiver_create() { - private_receiver_t *this = allocator_alloc_thing(private_receiver_t); + private_receiver_t *this = malloc_thing(private_receiver_t); this->public.destroy = (void(*)(receiver_t*)) destroy; this->receive_packets = receive_packets; - this->logger = charon->logger_manager->get_logger(charon->logger_manager, RECEIVER); + this->logger = logger_manager->get_logger(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"); - allocator_free(this); + free(this); charon->kill(charon, "Unable to create receiver thread"); } -- cgit v1.2.3