aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/threads/sender.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-04-10 08:07:38 +0000
committerMartin Willi <martin@strongswan.org>2006-04-10 08:07:38 +0000
commit5113680f95e522c677cdd37072cfffbdca06831e (patch)
tree973ac57accbc66b042e5307942c6cbbbf4f19579 /Source/charon/threads/sender.c
parent6862128151fb78f63685a8da5575783c426d64a7 (diff)
downloadstrongswan-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/sender.c')
-rw-r--r--Source/charon/threads/sender.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/charon/threads/sender.c b/Source/charon/threads/sender.c
index 90d9e409c..42d11beb9 100644
--- a/Source/charon/threads/sender.c
+++ b/Source/charon/threads/sender.c
@@ -29,7 +29,6 @@
#include <network/socket.h>
#include <network/packet.h>
#include <queues/send_queue.h>
-#include <utils/allocator.h>
#include <utils/logger_manager.h>
@@ -101,7 +100,7 @@ static void destroy(private_sender_t *this)
pthread_join(this->assigned_thread, NULL);
this->logger->log(this->logger, CONTROL | LEVEL1, "Sender thread terminated");
- allocator_free(this);
+ free(this);
}
/*
@@ -109,17 +108,17 @@ static void destroy(private_sender_t *this)
*/
sender_t * sender_create()
{
- private_sender_t *this = allocator_alloc_thing(private_sender_t);
+ private_sender_t *this = malloc_thing(private_sender_t);
this->send_packets = send_packets;
this->public.destroy = (void(*)(sender_t*)) destroy;
- this->logger = charon->logger_manager->get_logger(charon->logger_manager, SENDER);
+ this->logger = logger_manager->get_logger(logger_manager, SENDER);
if (pthread_create(&(this->assigned_thread), NULL, (void*(*)(void*))this->send_packets, this) != 0)
{
this->logger->log(this->logger, ERROR, "Sender thread could not be created");
- allocator_free(this);
+ free(this);
charon->kill(charon, "Unable to create sender thread");
}