From: cantor Date: Fri, 8 Feb 2008 17:57:03 +0000 (+0000) Subject: Allow role lookup with no protocol. X-Git-Tag: 2.4.1~248 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fopensaml2.git;a=commitdiff_plain;h=7bdf6cbec48950260247c956f3cd2d91d449e34d Allow role lookup with no protocol. git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/trunk@374 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0 --- 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?