diff options
author | Jan Hutter <jhutter@hsr.ch> | 2005-11-16 14:43:13 +0000 |
---|---|---|
committer | Jan Hutter <jhutter@hsr.ch> | 2005-11-16 14:43:13 +0000 |
commit | df917df71c69cd4764c84c3888e25fd2f385fdcc (patch) | |
tree | 6c465a7e2a98f02f0a8da2a0cf3b859d77540aca /Source/charon/jobs/job.c | |
parent | 2b3183835a8ef52927be7e421dc5f87b8cbe9df2 (diff) | |
download | strongswan-df917df71c69cd4764c84c3888e25fd2f385fdcc.tar.bz2 strongswan-df917df71c69cd4764c84c3888e25fd2f385fdcc.tar.xz |
- defined interface for each job and implemented incoming packet job and
initiate ike sa job
Diffstat (limited to 'Source/charon/jobs/job.c')
-rw-r--r-- | Source/charon/jobs/job.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/Source/charon/jobs/job.c b/Source/charon/jobs/job.c index bb125a10e..218800352 100644 --- a/Source/charon/jobs/job.c +++ b/Source/charon/jobs/job.c @@ -1,8 +1,8 @@ /** * @file job.c - * - * @brief Job-Class representing a job e.g. in job_queue - * + * + * @brief Job-Interface representing a job e.g. in job_queue + * */ /* @@ -20,11 +20,8 @@ * for more details. */ -#include <stdlib.h> - #include "job.h" -#include "../utils/allocator.h" mapping_t job_type_m[] = { {INCOMING_PACKET, "INCOMING_PACKET"}, @@ -32,27 +29,3 @@ mapping_t job_type_m[] = { {INITIATE_IKE_SA, "INITIATE_IKE_SA"}, {MAPPING_END, NULL} }; - - /** - * @brief implements function destroy of job_t - */ -static status_t job_destroy(job_t *job) -{ - allocator_free(job); - return SUCCESS; -} - -/* - * Creates a job (documented in header-file) - */ -job_t *job_create(job_type_t type, void *assigned_data) -{ - job_t *this = allocator_alloc_thing(job_t); - - this->destroy = job_destroy; - - this->type = type; - this->assigned_data = assigned_data; - - return this; -} |