From: Andreas Steffen Date: Sun, 7 Oct 2012 10:46:19 +0000 (+0200) Subject: test first and up in the outer while loop X-Git-Tag: 5.0.2dr4~391 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd198f48f22c41c412225755d8665b07b23bfa41;p=thirdparty%2Fstrongswan.git test first and up in the outer while loop --- diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c index b13193612a..6465f50960 100644 --- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c +++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c @@ -584,7 +584,7 @@ METHOD(tnc_ifmap_soap_t, publish_ike_sa, bool, * update or delete capability metadata */ e1 = ike_sa->create_auth_cfg_enumerator(ike_sa, FALSE); - while (e1->enumerate(e1, &auth)) + while (e1->enumerate(e1, &auth) && (first || up)) { e2 = auth->create_enumerator(auth); while (e2->enumerate(e2, &type, &group)) @@ -621,10 +621,6 @@ METHOD(tnc_ifmap_soap_t, publish_ike_sa, bool, axiom_node_add_child(node2, this->env, create_capability(this, group)); } - if (!first && !up) - { - break; - } } e2->destroy(e2); }