aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/threads/receiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/charon/threads/receiver.c')
-rw-r--r--Source/charon/threads/receiver.c9
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");
}