From fa5a58a5e3104223f3134b84dfac3f4500d9ffc5 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Wed, 4 May 2016 14:20:02 -0400 Subject: [PATCH] Adjust insertion handling in RegistrationInfo impl --- saml/saml2/metadata/impl/MetadataImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/saml/saml2/metadata/impl/MetadataImpl.cpp b/saml/saml2/metadata/impl/MetadataImpl.cpp index 1c83f01..65e48f8 100644 --- a/saml/saml2/metadata/impl/MetadataImpl.cpp +++ b/saml/saml2/metadata/impl/MetadataImpl.cpp @@ -2595,12 +2595,15 @@ namespace opensaml { public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { - list::iterator m_pos_RegistrationPolicy; + list::iterator m_pos_UnknownChildren; void init() { m_RegistrationAuthority = nullptr; m_RegistrationInstant = nullptr; - m_pos_RegistrationPolicy = m_children.begin(); + + m_children.push_back(nullptr); + m_pos_UnknownChildren = m_children.begin(); + ++m_pos_UnknownChildren; } protected: @@ -2637,7 +2640,7 @@ namespace opensaml { IMPL_XMLOBJECT_CLONE_EX(RegistrationInfo); IMPL_STRING_ATTRIB(RegistrationAuthority); IMPL_DATETIME_ATTRIB(RegistrationInstant,0); - IMPL_TYPED_CHILDREN(RegistrationPolicy,m_pos_RegistrationPolicy); + IMPL_TYPED_CHILDREN(RegistrationPolicy,m_pos_UnknownChildren); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) { -- 2.1.4