BOOST_DEFUN([Optional],
[BOOST_FIND_HEADER([boost/optional.hpp])])
+# BOOST_PTR_CONTAINER()
+# ----------------
+# Look for Boost.PointerContainer
+BOOST_DEFUN([Ptr_Container],
+[BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp])])
# BOOST_PREPROCESSOR()
# --------------------
if (entity) {
const XMLObject* r = find_if(
entity->getOrderedChildren(),
- (ll_dynamic_cast<const RoleDescriptor*>(_1) != nullptr && lambda::bind(isValid, ll_dynamic_cast<const TimeBoundSAMLObject*>(_1), now))
+ (ll_dynamic_cast<const RoleDescriptor*>(_1) != ((const RoleDescriptor*)nullptr) &&
+ lambda::bind(isValid, ll_dynamic_cast<const TimeBoundSAMLObject*>(_1), now))
);
if (r)
role = dynamic_cast<const RoleDescriptor*>(r);
private:
struct SAML_DLLLOCAL Mapping {
- Mapping() : m_expires(0) {}
- auto_ptr<XMLObject> m_xml;
+ Mapping() : m_xml(nullptr), m_expires(0) {}
+ ~Mapping() {
+ delete m_xml;
+ }
+ XMLObject* m_xml;
string m_relying;
time_t m_expires;
};
time_t now = time(nullptr);
multimap<time_t,string>::iterator stop = m_expMap.upper_bound(now);
for (multimap<time_t,string>::iterator i = m_expMap.begin(); i != stop; m_expMap.erase(i++)) {
+ delete m_artMap[i->second].m_xml;
m_artMap.erase(i->second);
}
// Key is the hexed handle.
string hexed = SAMLArtifact::toHex(artifact->getMessageHandle());
Mapping& m = m_artMap[hexed];
- m.m_xml.reset(content);
+ m.m_xml = content;
if (relyingParty)
m.m_relying = relyingParty;
m.m_expires = now + TTL;
- m_expMap.insert(pair<const time_t,string>(m.m_expires,hexed));
+ m_expMap.insert(pair<const time_t, string>(m.m_expires, hexed));
}
XMLObject* ArtifactMappings::retrieveContent(const SAMLArtifact* artifact, const char* relyingParty)
}
log.debug("resolved artifact for (%s)", relyingParty ? relyingParty : "unknown");
- XMLObject* ret = i->second.m_xml.release();
+ XMLObject* ret = i->second.m_xml;
+ i->second.m_xml = nullptr; // clear member so it doesn't get deleted
removeMapping(i);
return ret;
}
// Using XMLString::equals allows for both to be NULL and still match.
vector<EncryptedKey*>::const_iterator k = find_if(
m_ref.getEncryptedKeys().begin(), m_ref.getEncryptedKeys().end(),
- (lambda::bind(&EncryptedKey::getRecipient, _1) == nullptr ||
+ (lambda::bind(&EncryptedKey::getRecipient, _1) == ((const XMLCh*)nullptr) ||
lambda::bind(equal_fn, recipient, lambda::bind(&EncryptedKey::getRecipient, _1)))
);
return (k != m_ref.getEncryptedKeys().end()) ? (*k) : nullptr;
// search for those sites in the entire set of sites tracked by the sources map and
// remove them from both places.
set<const EntityDescriptor*> existingSites;
- pair<sitemap_t::const_iterator,sitemap_t::const_iterator> existingRange = m_sites.equal_range(id.get());
+ pair<sitemap_t::iterator,sitemap_t::iterator> existingRange = m_sites.equal_range(id.get());
static pair<set<const EntityDescriptor*>::iterator,bool> (set<const EntityDescriptor*>::* ins)(const EntityDescriptor* const &) =
&set<const EntityDescriptor*>::insert;
for_each(