Allow role lookup with no protocol.
[shibboleth/cpp-opensaml.git] / saml / saml2 / metadata / impl / ChainingMetadataProvider.cpp
index d0810d8..a55057e 100644 (file)
@@ -106,7 +106,6 @@ void ChainingMetadataProvider::init()
 
 Lockable* ChainingMetadataProvider::lock()
 {
-    m_log.debug("locked metadata chain (no-op)");
     return this;   // we're not lockable ourselves...
 }
 
@@ -117,10 +116,6 @@ void ChainingMetadataProvider::unlock()
     if (ptr) {
         m_tlsKey->setData(NULL);
         reinterpret_cast<MetadataProvider*>(ptr)->unlock();
-        m_log.debug("unlocked embedded metadata provider (%p)", ptr);
-    }
-    else {
-        m_log.debug("unlocked metadata chain (no-op)");
     }
 }
 
@@ -172,8 +167,6 @@ const EntitiesDescriptor* ChainingMetadataProvider::getEntitiesDescriptor(const
 
 pair<const EntityDescriptor*,const RoleDescriptor*> ChainingMetadataProvider::getEntityDescriptor(const Criteria& criteria) const
 {
-    bool bRole = (criteria.role && criteria.protocol);  // searching for role also?
-
     // Clear any existing lock.
     const_cast<ChainingMetadataProvider*>(this)->unlock();
 
@@ -185,7 +178,7 @@ pair<const EntityDescriptor*,const RoleDescriptor*> 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?