}
+
+/**
+ * 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.
/* 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 */
return this->configuration_name;
}
-
/**
* Implements job_t's and initiate_ike_sa_job_t's destroy function.
* See #job_t.destroy or #initiate_ike_sa_job_t.destroy for description.
/* interface functions */
this->public.job_interface.get_type = (job_type_t (*) (job_t *)) get_type;
+ /* same as destroy */
+ this->public.job_interface.destroy_all = (status_t (*) (job_t *)) destroy;
this->public.job_interface.destroy = destroy;
/* public functions */
* for more details.
*/
+
#include "job.h"
job_type_t (*get_type) (job_t *this);
/**
+ * @brief Destroys a job_t object and all assigned data!
+ *
+ * @param job_t calling object
+ * @returns SUCCESS if succeeded, FAILED otherwise
+ */
+ status_t (*destroy_all) (job_t *job);
+
+ /**
* @brief Destroys a job_t object
*
* @param job_t calling object