diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-05-19 17:27:32 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-07-06 09:43:45 +0200 |
commit | 4bbce1ef37d08f65084e14d4d30bfa512dd49767 (patch) | |
tree | 2ff300f2e66bf50e2dbd3bc0df842f02c76c776d /src/libcharon/sa/tasks/ike_rekey.c | |
parent | 4f9c691adbb0763d59b3f58f5bbd3dbb36748a76 (diff) | |
download | strongswan-4bbce1ef37d08f65084e14d4d30bfa512dd49767.tar.bz2 strongswan-4bbce1ef37d08f65084e14d4d30bfa512dd49767.tar.xz |
Replaced ike_sa_t.create_child_sa_iterator with enumerator.
This required two new methods on ike_sa_t. One returns the number of
CHILD_SAs and one allows to remove a CHILD_SA.
Diffstat (limited to 'src/libcharon/sa/tasks/ike_rekey.c')
-rw-r--r-- | src/libcharon/sa/tasks/ike_rekey.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcharon/sa/tasks/ike_rekey.c b/src/libcharon/sa/tasks/ike_rekey.c index c055dabc1..826d6e192 100644 --- a/src/libcharon/sa/tasks/ike_rekey.c +++ b/src/libcharon/sa/tasks/ike_rekey.c @@ -147,8 +147,8 @@ METHOD(task_t, build_i, status_t, METHOD(task_t, process_r, status_t, private_ike_rekey_t *this, message_t *message) { + enumerator_t *enumerator; peer_cfg_t *peer_cfg; - iterator_t *iterator; child_sa_t *child_sa; if (this->ike_sa->get_state(this->ike_sa) == IKE_DELETING) @@ -157,8 +157,8 @@ METHOD(task_t, process_r, status_t, return NEED_MORE; } - iterator = this->ike_sa->create_child_sa_iterator(this->ike_sa); - while (iterator->iterate(iterator, (void**)&child_sa)) + enumerator = this->ike_sa->create_child_sa_enumerator(this->ike_sa); + while (enumerator->enumerate(enumerator, (void**)&child_sa)) { switch (child_sa->get_state(child_sa)) { @@ -167,13 +167,13 @@ METHOD(task_t, process_r, status_t, case CHILD_DELETING: /* we do not allow rekeying while we have children in-progress */ DBG1(DBG_IKE, "peer initiated rekeying, but a child is half-open"); - iterator->destroy(iterator); + enumerator->destroy(enumerator); return NEED_MORE; default: break; } } - iterator->destroy(iterator); + enumerator->destroy(enumerator); this->new_sa = charon->ike_sa_manager->checkout_new(charon->ike_sa_manager, FALSE); |