From b4b8716a04b1ab98a9c50d4acaa1f3972152332f Mon Sep 17 00:00:00 2001 From: cantor Date: Tue, 3 Mar 2009 18:11:19 +0000 Subject: [PATCH] https://bugs.internet2.edu/jira/browse/SSPCPP-190 git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@2944 cb58f699-b61c-0410-a6fe-9272a202ed29 --- .../attribute/filtering/impl/XMLAttributeFilter.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp b/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp index afd10e1..32fab83 100644 --- a/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp +++ b/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp @@ -433,18 +433,19 @@ void XMLFilterImpl::filterAttributes(const FilteringContext& context, vectorremoveValue(index-1); } + } - // Check for no values. - if (attr->valueCount() == 0) { - m_log.warn( - "no values left, removing attribute (%s) from (%s)", - attr->getId(), issuer.get() ? issuer.get() : "unknown source" - ); - delete attr; - attributes.erase(attributes.begin() + a); - continue; - } + // Check for no values. + if (attr->valueCount() == 0) { + m_log.warn( + "no values left, removing attribute (%s) from (%s)", + attr->getId(), issuer.get() ? issuer.get() : "unknown source" + ); + delete attr; + attributes.erase(attributes.begin() + a); + continue; } + ++a; } } -- 2.1.4