From: Scott Cantor Date: Fri, 8 Feb 2008 17:57:03 +0000 (+0000) Subject: Allow role lookup with no protocol. X-Git-Tag: 2.0.0~9 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=commitdiff_plain;h=17b312daa349580f67cc07fc190125224146cf14;hp=3bed08b2d983bce1c808ee494f8c15e08eb0f246 Allow role lookup with no protocol. --- diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp index dd9cc14..fd7948c 100644 --- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp @@ -205,7 +205,7 @@ pair AbstractMetadataProvider::ge if (!result.first && !criteria.validOnly && range.first!=range.second) result.first = range.first->second; - if (result.first && criteria.role && criteria.protocol) { + if (result.first && criteria.role) { result.second = result.first->getRoleDescriptor(*criteria.role, criteria.protocol); if (!result.second && criteria.protocol2) result.second = result.first->getRoleDescriptor(*criteria.role, criteria.protocol2); diff --git a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp index f1e5881..a55057e 100644 --- a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp @@ -167,8 +167,6 @@ const EntitiesDescriptor* ChainingMetadataProvider::getEntitiesDescriptor(const pair ChainingMetadataProvider::getEntityDescriptor(const Criteria& criteria) const { - bool bRole = (criteria.role && criteria.protocol); // searching for role also? - // Clear any existing lock. const_cast(this)->unlock(); @@ -180,7 +178,7 @@ pair ChainingMetadataProvider::ge (*i)->lock(); cur = (*i)->getEntityDescriptor(criteria); if (cur.first) { - if (bRole) { + if (criteria.role) { // We want a role also. Did we find one? if (cur.second) { // Are we using a first match policy?