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/sa/states/ike_sa_init_requested.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/sa/states/ike_sa_init_requested.c')
-rw-r--r-- | Source/charon/sa/states/ike_sa_init_requested.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/charon/sa/states/ike_sa_init_requested.c b/Source/charon/sa/states/ike_sa_init_requested.c index 8d3ae55ed..e3769303c 100644 --- a/Source/charon/sa/states/ike_sa_init_requested.c +++ b/Source/charon/sa/states/ike_sa_init_requested.c @@ -23,7 +23,6 @@ #include "ike_sa_init_requested.h" #include <daemon.h> -#include <utils/allocator.h> #include <encoding/payloads/sa_payload.h> #include <encoding/payloads/ke_payload.h> #include <encoding/payloads/nonce_payload.h> @@ -411,7 +410,7 @@ static status_t process_message(private_ike_sa_init_requested_t *this, message_t */ status_t process_nonce_payload (private_ike_sa_init_requested_t *this, nonce_payload_t *nonce_payload) { - allocator_free(this->received_nonce.ptr); + free(this->received_nonce.ptr); this->received_nonce = nonce_payload->get_nonce(nonce_payload); return SUCCESS; } @@ -693,12 +692,12 @@ static ike_sa_state_t get_state(private_ike_sa_init_requested_t *this) static void destroy_after_state_change (private_ike_sa_init_requested_t *this) { this->diffie_hellman->destroy(this->diffie_hellman); - allocator_free_chunk(&(this->ike_sa_init_request_data)); + chunk_free(&(this->ike_sa_init_request_data)); if (this->proposal) { this->proposal->destroy(this->proposal); } - allocator_free(this); + free(this); } /** @@ -707,9 +706,9 @@ static void destroy_after_state_change (private_ike_sa_init_requested_t *this) static void destroy(private_ike_sa_init_requested_t *this) { this->diffie_hellman->destroy(this->diffie_hellman); - allocator_free(this->sent_nonce.ptr); - allocator_free(this->received_nonce.ptr); - allocator_free_chunk(&(this->ike_sa_init_request_data)); + free(this->sent_nonce.ptr); + free(this->received_nonce.ptr); + chunk_free(&(this->ike_sa_init_request_data)); if (this->child_sa) { this->child_sa->destroy(this->child_sa); @@ -718,7 +717,7 @@ static void destroy(private_ike_sa_init_requested_t *this) { this->proposal->destroy(this->proposal); } - allocator_free(this); + free(this); } /* @@ -726,7 +725,7 @@ static void destroy(private_ike_sa_init_requested_t *this) */ ike_sa_init_requested_t *ike_sa_init_requested_create(protected_ike_sa_t *ike_sa, diffie_hellman_t *diffie_hellman, chunk_t sent_nonce,chunk_t ike_sa_init_request_data) { - private_ike_sa_init_requested_t *this = allocator_alloc_thing(private_ike_sa_init_requested_t); + private_ike_sa_init_requested_t *this = malloc_thing(private_ike_sa_init_requested_t); /* interface functions */ this->public.state_interface.process_message = (status_t (*) (state_t *,message_t *)) process_message; @@ -748,7 +747,7 @@ ike_sa_init_requested_t *ike_sa_init_requested_create(protected_ike_sa_t *ike_sa /* private data */ this->ike_sa = ike_sa; this->received_nonce = CHUNK_INITIALIZER; - this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA); + this->logger = logger_manager->get_logger(logger_manager, IKE_SA); this->diffie_hellman = diffie_hellman; this->proposal = NULL; this->sent_nonce = sent_nonce; |