diff options
author | Jan Hutter <jhutter@hsr.ch> | 2005-11-17 12:49:56 +0000 |
---|---|---|
committer | Jan Hutter <jhutter@hsr.ch> | 2005-11-17 12:49:56 +0000 |
commit | f07a80d192330751c12eb9f0f23b8205246ea26a (patch) | |
tree | 8d1476f053988fe265d590da7ccc089ec751ce3f /Source/charon/jobs/incoming_packet_job.c | |
parent | e31eb71e1c88a9dd6ae940fa6cec61a9cb5d72c8 (diff) | |
download | strongswan-f07a80d192330751c12eb9f0f23b8205246ea26a.tar.bz2 strongswan-f07a80d192330751c12eb9f0f23b8205246ea26a.tar.xz |
- added destroy_all to job_t
Diffstat (limited to 'Source/charon/jobs/incoming_packet_job.c')
-rw-r--r-- | Source/charon/jobs/incoming_packet_job.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/charon/jobs/incoming_packet_job.c b/Source/charon/jobs/incoming_packet_job.c index c7758faed..fe311d248 100644 --- a/Source/charon/jobs/incoming_packet_job.c +++ b/Source/charon/jobs/incoming_packet_job.c @@ -68,6 +68,21 @@ static status_t get_packet(private_incoming_packet_job_t *this,packet_t **packet } + +/** + * Implements job_t's and destroy_all function. + * See #job_t.destroy_all description. + */ +static status_t destroy_all(private_incoming_packet_job_t *this) +{ + if (this->packet != NULL) + { + this->packet->destroy(this->packet); + } + allocator_free(this); + return SUCCESS; +} + /** * Implements job_t's and incoming_packet_job_t's destroy function. * See #job_t.destroy or #incoming_packet_job_t.destroy for description. @@ -93,6 +108,7 @@ incoming_packet_job_t *incoming_packet_job_create(packet_t *packet) /* interface functions */ this->public.job_interface.get_type = (job_type_t (*) (job_t *)) get_type; + this->public.job_interface.destroy_all = (status_t (*) (job_t *)) destroy_all; this->public.job_interface.destroy = destroy; /* public functions */ |