diff options
author | Jan Hutter <jhutter@hsr.ch> | 2005-11-09 09:35:06 +0000 |
---|---|---|
committer | Jan Hutter <jhutter@hsr.ch> | 2005-11-09 09:35:06 +0000 |
commit | 6c4b815f22341ad3c2574b42a64b39e16ef1e7c7 (patch) | |
tree | 57c322fecce2b837b34654758a0e394ffdfaa90e /Source/charon/socket.c | |
parent | 79538669625bbae26fcef5d791b2246242c5a407 (diff) | |
download | strongswan-6c4b815f22341ad3c2574b42a64b39e16ef1e7c7.tar.bz2 strongswan-6c4b815f22341ad3c2574b42a64b39e16ef1e7c7.tar.xz |
- memory allocation now works with allocator-functions...
Diffstat (limited to 'Source/charon/socket.c')
-rw-r--r-- | Source/charon/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/charon/socket.c b/Source/charon/socket.c index 782a349b2..5b6ad2f8c 100644 --- a/Source/charon/socket.c +++ b/Source/charon/socket.c @@ -22,8 +22,6 @@ * for more details. */ -#include "socket.h" - #include <pthread.h> #include <sys/types.h> #include <sys/socket.h> @@ -34,6 +32,8 @@ #include <pluto/constants.h> #include <pluto/defs.h> +#include "allocator.h" +#include "socket.h" typedef struct private_socket_s private_socket_t; @@ -83,7 +83,7 @@ status_t receiver(private_socket_t *this, packet_t **packet) } /* fill in packet */ - pkt->data.ptr = allocator_alloc(pkt->data.len, "data in packet_t"); + pkt->data.ptr = allocator_alloc(pkt->data.len); memcpy(pkt->data.ptr, buffer, pkt->data.len); /* return packet */ @@ -124,7 +124,7 @@ status_t destroy(private_socket_t *this) socket_t *socket_create(u_int16_t port) { - private_socket_t *this = allocator_alloc_thing(private_socket_t, "private_socket_t"); + private_socket_t *this = allocator_alloc_thing(private_socket_t); struct sockaddr_in addr; /* public functions */ |