- globals packed in a daemon
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#include "generator.h"
|
||||
|
||||
#include <types.h>
|
||||
#include <globals.h>
|
||||
#include <daemon.h>
|
||||
#include <utils/allocator.h>
|
||||
#include <utils/linked_list.h>
|
||||
#include <utils/logger_manager.h>
|
||||
@@ -933,7 +933,7 @@ static void generate_payload (private_generator_t *this,payload_t *payload)
|
||||
static status_t destroy(private_generator_t *this)
|
||||
{
|
||||
allocator_free(this->buffer);
|
||||
global_logger_manager->destroy_logger(global_logger_manager,this->logger);
|
||||
charon->logger_manager->destroy_logger(charon->logger_manager,this->logger);
|
||||
allocator_free(this);
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -977,7 +977,7 @@ generator_t * generator_create()
|
||||
this->current_bit = 0;
|
||||
this->last_payload_length_position_offset = 0;
|
||||
this->header_length_position_offset = 0;
|
||||
this->logger = global_logger_manager->create_logger(global_logger_manager,GENERATOR,NULL);
|
||||
this->logger = charon->logger_manager->create_logger(charon->logger_manager,GENERATOR,NULL);
|
||||
|
||||
return &(this->public);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "message.h"
|
||||
|
||||
#include <types.h>
|
||||
#include <globals.h>
|
||||
#include <daemon.h>
|
||||
#include <sa/ike_sa_id.h>
|
||||
#include <encoding/generator.h>
|
||||
#include <encoding/parser.h>
|
||||
@@ -736,7 +736,7 @@ static void destroy (private_message_t *this)
|
||||
iterator->destroy(iterator);
|
||||
this->payloads->destroy(this->payloads);
|
||||
this->parser->destroy(this->parser);
|
||||
global_logger_manager->destroy_logger(global_logger_manager, this->logger);
|
||||
charon->logger_manager->destroy_logger(charon->logger_manager, this->logger);
|
||||
|
||||
allocator_free(this);
|
||||
}
|
||||
@@ -795,7 +795,7 @@ message_t *message_create_from_packet(packet_t *packet)
|
||||
/* parser is created from data of packet */
|
||||
this->parser = parser_create(this->packet->data);
|
||||
|
||||
this->logger = global_logger_manager->create_logger(global_logger_manager, MESSAGE, NULL);
|
||||
this->logger = charon->logger_manager->create_logger(charon->logger_manager, MESSAGE, NULL);
|
||||
|
||||
return (&this->public);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <definitions.h>
|
||||
#include <globals.h>
|
||||
#include <daemon.h>
|
||||
#include <utils/allocator.h>
|
||||
#include <utils/logger.h>
|
||||
#include <utils/linked_list.h>
|
||||
@@ -875,7 +875,7 @@ static void reset_context (private_parser_t *this)
|
||||
*/
|
||||
static void destroy(private_parser_t *this)
|
||||
{
|
||||
global_logger_manager->destroy_logger(global_logger_manager,this->logger);
|
||||
charon->logger_manager->destroy_logger(charon->logger_manager,this->logger);
|
||||
allocator_free(this);
|
||||
}
|
||||
|
||||
@@ -886,7 +886,7 @@ parser_t *parser_create(chunk_t data)
|
||||
{
|
||||
private_parser_t *this = allocator_alloc_thing(private_parser_t);
|
||||
|
||||
this->logger = global_logger_manager->create_logger(global_logger_manager, PARSER, NULL);
|
||||
this->logger = charon->logger_manager->create_logger(charon->logger_manager, PARSER, NULL);
|
||||
|
||||
this->public.parse_payload = (status_t(*)(parser_t*,payload_type_t,payload_t**)) parse_payload;
|
||||
this->public.reset_context = (void(*)(parser_t*)) reset_context;
|
||||
|
||||
@@ -360,7 +360,7 @@ static status_t encrypt(private_encryption_payload_t *this, crypter_t *crypter)
|
||||
|
||||
/* encrypt concatenated chunk */
|
||||
allocator_free(this->encrypted.ptr);
|
||||
status = crypter->encrypt(crypter, iv, concatenated, &(this->encrypted));
|
||||
status = crypter->encrypt(crypter, concatenated, iv, &(this->encrypted));
|
||||
allocator_free(padding.ptr);
|
||||
allocator_free(concatenated.ptr);
|
||||
allocator_free(iv.ptr);
|
||||
@@ -408,7 +408,7 @@ static status_t decrypt(private_encryption_payload_t *this, crypter_t *crypter)
|
||||
/* free previus data, if any */
|
||||
allocator_free(this->decrypted.ptr);
|
||||
|
||||
status = crypter->decrypt(crypter, iv, concatenated, &(this->decrypted));
|
||||
status = crypter->decrypt(crypter, concatenated, iv, &(this->decrypted));
|
||||
if (status != SUCCESS)
|
||||
{
|
||||
return FAILED;
|
||||
|
||||
Reference in New Issue
Block a user