From 69538bbf41bf3d8394e12d5b148adb9615b22867 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Wed, 6 Jun 2007 16:13:25 +0000 Subject: [PATCH] Set storage context for DOM constructed map. --- saml/binding/impl/ArtifactMap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/saml/binding/impl/ArtifactMap.cpp b/saml/binding/impl/ArtifactMap.cpp index 9d4e347..b8ecb22 100644 --- a/saml/binding/impl/ArtifactMap.cpp +++ b/saml/binding/impl/ArtifactMap.cpp @@ -141,7 +141,7 @@ XMLObject* ArtifactMappings::retrieveContent(const SAMLArtifact* artifact, const } ArtifactMap::ArtifactMap(xmltooling::StorageService* storage, const char* context, unsigned int artifactTTL) - : m_storage(storage), m_context(context ? context : "opensaml::ArtifactMap"), m_mappings(NULL), m_artifactTTL(artifactTTL) + : m_storage(storage), m_context((context && *context) ? context : "opensaml::ArtifactMap"), m_mappings(NULL), m_artifactTTL(artifactTTL) { if (!m_storage) m_mappings = new ArtifactMappings(); @@ -154,6 +154,8 @@ ArtifactMap::ArtifactMap(const DOMElement* e, xmltooling::StorageService* storag auto_ptr_char c(e->getAttributeNS(NULL, context)); if (c.get() && *c.get()) m_context = c.get(); + else + m_context = "opensaml::ArtifactMap"; const XMLCh* TTL = e->getAttributeNS(NULL, artifactTTL); if (TTL) { -- 2.1.4