diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
commit | b34738ed08c2227300d554b139e2495ca5da97d6 (patch) | |
tree | 62f33b52820f2e49f0e53c0f8c636312037c8054 /src/libcharon/processing/jobs/inactivity_job.c | |
parent | 0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff) | |
download | vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip |
Imported Upstream version 4.6.4
Diffstat (limited to 'src/libcharon/processing/jobs/inactivity_job.c')
-rw-r--r-- | src/libcharon/processing/jobs/inactivity_job.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/libcharon/processing/jobs/inactivity_job.c b/src/libcharon/processing/jobs/inactivity_job.c index 1371000eb..251b9ab03 100644 --- a/src/libcharon/processing/jobs/inactivity_job.c +++ b/src/libcharon/processing/jobs/inactivity_job.c @@ -61,15 +61,15 @@ METHOD(job_t, execute, void, this->reqid, TRUE); if (ike_sa) { - iterator_t *iterator; + enumerator_t *enumerator; child_sa_t *child_sa; u_int32_t delete = 0; protocol_id_t proto = 0; int children = 0; status_t status = SUCCESS; - iterator = ike_sa->create_child_sa_iterator(ike_sa); - while (iterator->iterate(iterator, (void**)&child_sa)) + enumerator = ike_sa->create_child_sa_enumerator(ike_sa); + while (enumerator->enumerate(enumerator, (void**)&child_sa)) { if (child_sa->get_reqid(child_sa) == this->reqid) { @@ -94,7 +94,7 @@ METHOD(job_t, execute, void, } children++; } - iterator->destroy(iterator); + enumerator->destroy(enumerator); if (delete) { @@ -127,6 +127,12 @@ METHOD(job_t, execute, void, } } +METHOD(job_t, get_priority, job_priority_t, + private_inactivity_job_t *this) +{ + return JOB_PRIO_MEDIUM; +} + /** * See header */ @@ -137,8 +143,9 @@ inactivity_job_t *inactivity_job_create(u_int32_t reqid, u_int32_t timeout, INIT(this, .public = { - .job_interface = { + .job_interface = { .execute = _execute, + .get_priority = _get_priority, .destroy = _destroy, }, }, |