[cpp-opensaml] 02/03: Adjust insertion handling in RegistrationInfo impl

Scott Cantor cantor.2 at osu.edu
Wed May 4 19:57:27 EDT 2016


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-opensaml.

commit fa5a58a5e3104223f3134b84dfac3f4500d9ffc5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed May 4 14:20:02 2016 -0400

    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<XMLObject*>::iterator m_pos_RegistrationPolicy;
+            list<XMLObject*>::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) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list