diff options
author | Martin Willi <martin@strongswan.org> | 2006-04-10 08:07:38 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-04-10 08:07:38 +0000 |
commit | 5113680f95e522c677cdd37072cfffbdca06831e (patch) | |
tree | 973ac57accbc66b042e5307942c6cbbbf4f19579 /Source/charon/threads/receiver.c | |
parent | 6862128151fb78f63685a8da5575783c426d64a7 (diff) | |
download | strongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.bz2 strongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.xz |
- 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
Diffstat (limited to 'Source/charon/threads/receiver.c')
-rw-r--r-- | Source/charon/threads/receiver.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 <queues/job_queue.h> #include <queues/jobs/job.h> #include <queues/jobs/incoming_packet_job.h> -#include <utils/allocator.h> #include <utils/logger_manager.h> @@ -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"); } |