diff options
author | Frederic Peters <fpeters@entrouvert.com> | 2004-12-23 16:50:23 +0000 |
---|---|---|
committer | Frederic Peters <fpeters@entrouvert.com> | 2004-12-23 16:50:23 +0000 |
commit | 05e3610efb70fa0ed253afec17ac5f9001d25694 (patch) | |
tree | 0a5d4ce4441377f3d22eb5acba139bc35974c6ef | |
parent | a9419210d9c74a6d27eab96b1e5fd2c3f8b296c1 (diff) | |
download | lasso-05e3610efb70fa0ed253afec17ac5f9001d25694.tar.gz lasso-05e3610efb70fa0ed253afec17ac5f9001d25694.tar.xz lasso-05e3610efb70fa0ed253afec17ac5f9001d25694.zip |
Moved <lib:Extension> to xmlNode* since the developer can use xmlAddNextSibling
to add other nodes. (not tested)
-rw-r--r-- | lasso/xml/dst_query.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_authn_request.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_authn_request_envelope.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_authn_response.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_federation_termination_notification.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_logout_request.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_name_identifier_mapping_request.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_name_identifier_mapping_response.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_register_name_identifier_request.h | 2 | ||||
-rw-r--r-- | lasso/xml/lib_status_response.h | 2 | ||||
-rw-r--r-- | lasso/xml/xml.c | 18 |
11 files changed, 19 insertions, 19 deletions
diff --git a/lasso/xml/dst_query.h b/lasso/xml/dst_query.h index 036972ae..99a42ebe 100644 --- a/lasso/xml/dst_query.h +++ b/lasso/xml/dst_query.h @@ -54,7 +54,7 @@ struct _LassoDstQuery { LassoDiscoResourceID *ResourceID; LassoDiscoEncryptedResourceID *EncryptedResourceID; GList *QueryItem; - GList *Extension; + xmlNode *Extension; char *id; char *itemID; diff --git a/lasso/xml/lib_authn_request.h b/lasso/xml/lib_authn_request.h index 6ce68bf0..e6c763f1 100644 --- a/lasso/xml/lib_authn_request.h +++ b/lasso/xml/lib_authn_request.h @@ -54,7 +54,7 @@ struct _LassoLibAuthnRequest { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="ProviderID"/> */ char *ProviderID; /* <xs:element ref="AffiliationID" minOccurs="0"/> */ diff --git a/lasso/xml/lib_authn_request_envelope.h b/lasso/xml/lib_authn_request_envelope.h index fe1e183f..fb8c55eb 100644 --- a/lasso/xml/lib_authn_request_envelope.h +++ b/lasso/xml/lib_authn_request_envelope.h @@ -57,7 +57,7 @@ struct _LassoLibAuthnRequestEnvelope { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="AuthnRequest"/> */ LassoLibAuthnRequest *AuthnRequest; /* <xs:element ref="ProviderID"/> */ diff --git a/lasso/xml/lib_authn_response.h b/lasso/xml/lib_authn_response.h index 2d16f5ad..1af9817e 100644 --- a/lasso/xml/lib_authn_response.h +++ b/lasso/xml/lib_authn_response.h @@ -55,7 +55,7 @@ struct _LassoLibAuthnResponse { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="ProviderID"/> */ char *ProviderID; /* <xs:element ref="RelayState" minOccurs="0"/> */ diff --git a/lasso/xml/lib_federation_termination_notification.h b/lasso/xml/lib_federation_termination_notification.h index 1ae46c50..a1276b52 100644 --- a/lasso/xml/lib_federation_termination_notification.h +++ b/lasso/xml/lib_federation_termination_notification.h @@ -59,7 +59,7 @@ struct _LassoLibFederationTerminationNotification { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="ProviderID"/> */ char *ProviderID; /* <xs:element ref="saml:NameIdentifier"/> */ diff --git a/lasso/xml/lib_logout_request.h b/lasso/xml/lib_logout_request.h index 70fb4a07..93bda637 100644 --- a/lasso/xml/lib_logout_request.h +++ b/lasso/xml/lib_logout_request.h @@ -55,7 +55,7 @@ struct _LassoLibLogoutRequest { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; char *ProviderID; LassoSamlNameIdentifier *NameIdentifier; char *SessionIndex; diff --git a/lasso/xml/lib_name_identifier_mapping_request.h b/lasso/xml/lib_name_identifier_mapping_request.h index b200b876..75c78aea 100644 --- a/lasso/xml/lib_name_identifier_mapping_request.h +++ b/lasso/xml/lib_name_identifier_mapping_request.h @@ -58,7 +58,7 @@ struct _LassoLibNameIdentifierMappingRequest { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="ProviderID"/> */ char *ProviderID; /* <xs:element ref="saml:NameIdentifier"/> */ diff --git a/lasso/xml/lib_name_identifier_mapping_response.h b/lasso/xml/lib_name_identifier_mapping_response.h index ca27a27a..96f9baa3 100644 --- a/lasso/xml/lib_name_identifier_mapping_response.h +++ b/lasso/xml/lib_name_identifier_mapping_response.h @@ -60,7 +60,7 @@ struct _LassoLibNameIdentifierMappingResponse { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="ProviderID"/> */ char *ProviderID; /* <xs:element ref="samlp:Status"/> */ diff --git a/lasso/xml/lib_register_name_identifier_request.h b/lasso/xml/lib_register_name_identifier_request.h index 48879d97..4fee649d 100644 --- a/lasso/xml/lib_register_name_identifier_request.h +++ b/lasso/xml/lib_register_name_identifier_request.h @@ -58,7 +58,7 @@ struct _LassoLibRegisterNameIdentifierRequest { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="ProviderID"/> */ char *ProviderID; /* <xs:element ref="IDPProvidedNameIdentifier"/> */ diff --git a/lasso/xml/lib_status_response.h b/lasso/xml/lib_status_response.h index b7f483bb..6c503cd9 100644 --- a/lasso/xml/lib_status_response.h +++ b/lasso/xml/lib_status_response.h @@ -55,7 +55,7 @@ struct _LassoLibStatusResponse { /*< public >*/ /* <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> */ - GList *Extension; + xmlNode *Extension; /* <xs:element ref="ProviderID"/> */ char *ProviderID; /* <xs:element ref="samlp:Status"/> */ diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 922de4ed..5782c7a2 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -511,8 +511,12 @@ lasso_node_impl_init_from_xml(LassoNode *node, xmlNode *xmlnode) xmlChar *s = xmlNodeGetContent(t); *location = g_list_append(*location, s); } else if (type == SNIPPET_EXTENSION) { - GList **location = value; - *location = g_list_append(*location, xmlCopyNode(t, 2)); + xmlNode **extension = value; + if (*extension) { + xmlAddNextSibling(*extension, t); + } else { + *extension = xmlCopyNode(t, 2); + } } if (tmp == NULL) @@ -653,12 +657,12 @@ lasso_node_dispose(GObject *object) lasso_node_destroy(*value); break; case SNIPPET_EXTENSION: + xmlFreeNodeList(*value); + break; case SNIPPET_LIST_NODES: case SNIPPET_LIST_CONTENT: elem = (GList*)(*value); while (elem) { - if (type == SNIPPET_EXTENSION) - xmlFreeNode(elem->data); if (type == SNIPPET_LIST_NODES) lasso_node_destroy(elem->data); if (type == SNIPPET_LIST_CONTENT) @@ -1090,11 +1094,7 @@ lasso_node_build_xmlNode_from_snippets(LassoNode *node, xmlNode *xmlnode, } break; case SNIPPET_EXTENSION: - elem = (GList *)value; - while (elem) { - xmlAddChild(xmlnode, xmlCopyNode(elem->data, 2)); - elem = g_list_next(elem); - } + xmlAddChild(xmlnode, xmlCopyNode((xmlNode*)value, 2)); break; case SNIPPET_SIGNATURE: lasso_node_add_signature_template(node, xmlnode, snippet); |