#include "saml/binding/SAMLArtifact.h"
#include "saml2/metadata/ChainingMetadataProvider.h"
+#include <memory>
#include <xercesc/util/XMLUniDefs.hpp>
#include <xmltooling/logging.h>
#include <xmltooling/util/XMLHelper.h>
Lockable* ChainingMetadataProvider::lock()
{
- m_log.debug("locked metadata chain (no-op)");
return this; // we're not lockable ourselves...
}
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)");
}
}
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();
(*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?