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/network/packet.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/network/packet.c')
-rw-r--r-- | Source/charon/network/packet.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/charon/network/packet.c b/Source/charon/network/packet.c index b6501d8ae..6cded72a3 100644 --- a/Source/charon/network/packet.c +++ b/Source/charon/network/packet.c @@ -23,8 +23,6 @@ #include "packet.h" -#include <utils/allocator.h> - typedef struct private_packet_t private_packet_t; @@ -107,7 +105,7 @@ static chunk_t get_data(private_packet_t *this) */ static void set_data(private_packet_t *this, chunk_t data) { - allocator_free(this->data.ptr); + free(this->data.ptr); this->data = data; } @@ -124,8 +122,8 @@ static void destroy(private_packet_t *this) { this->destination->destroy(this->destination); } - allocator_free(this->data.ptr); - allocator_free(this); + free(this->data.ptr); + free(this); } /** @@ -156,7 +154,7 @@ static packet_t *clone(private_packet_t *this) /* only clone existing chunks :-) */ if (this->data.ptr != NULL) { - other->data.ptr = allocator_clone_bytes(this->data.ptr,this->data.len); + other->data.ptr = clalloc(this->data.ptr,this->data.len); other->data.len = this->data.len; } else @@ -172,7 +170,7 @@ static packet_t *clone(private_packet_t *this) */ packet_t *packet_create() { - private_packet_t *this = allocator_alloc_thing(private_packet_t); + private_packet_t *this = malloc_thing(private_packet_t); this->public.set_data = (void(*) (packet_t *,chunk_t)) set_data; this->public.get_data = (chunk_t(*) (packet_t *)) get_data; |