aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/threads/thread_pool.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2005-11-29 08:08:03 +0000
committerMartin Willi <martin@strongswan.org>2005-11-29 08:08:03 +0000
commitdf3c59d0889a337eff9f994e92a5dc165ba1729f (patch)
tree7973747444155ea669e3f2dc1177b9b2eb3fc8a1 /Source/charon/threads/thread_pool.c
parented37dee61daf5bb272c04b79787da282abaa9447 (diff)
downloadstrongswan-df3c59d0889a337eff9f994e92a5dc165ba1729f.tar.bz2
strongswan-df3c59d0889a337eff9f994e92a5dc165ba1729f.tar.xz
- changed allocation behavior
Diffstat (limited to 'Source/charon/threads/thread_pool.c')
-rw-r--r--Source/charon/threads/thread_pool.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/Source/charon/threads/thread_pool.c b/Source/charon/threads/thread_pool.c
index 8e8bd8f99..58310ebc5 100644
--- a/Source/charon/threads/thread_pool.c
+++ b/Source/charon/threads/thread_pool.c
@@ -159,19 +159,10 @@ static void process_incoming_packet_job(private_thread_pool_t *this, incoming_pa
ike_sa_id_t *ike_sa_id;
status_t status;
- if (job->get_packet(job,&packet) != SUCCESS)
- {
- this->worker_logger->log(this->worker_logger, ERROR, "packet in job could not be retrieved!");
- return;
- }
+
+ packet = job->get_packet(job);
message = message_create_from_packet(packet);
- if (message == NULL)
- {
- this->worker_logger->log(this->worker_logger, ERROR, "message could not be created from packet!");
- packet->destroy(packet);
- return;
- }
status = message->parse_header(message);
if (status != SUCCESS)
@@ -194,13 +185,7 @@ static void process_incoming_packet_job(private_thread_pool_t *this, incoming_pa
/* Todo send notify */
}
- status = message->get_ike_sa_id(message, &ike_sa_id);
- if (status != SUCCESS)
- {
- this->worker_logger->log(this->worker_logger, ERROR, "IKE SA ID of message could not be created!");
- message->destroy(message);
- return;
- }
+ message->get_ike_sa_id(message, &ike_sa_id);
ike_sa_id->switch_initiator(ike_sa_id);