summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2004-11-01 14:55:19 +0000
committerFrederic Peters <fpeters@entrouvert.com>2004-11-01 14:55:19 +0000
commit2a5761ccbdd0375677b4621ea85e3eba8d7466e4 (patch)
tree72f0fffc1cd860f03c8c8e11a190db4df3a32b3c
parentf12c970ba818824baa4cdb9d731291792a9cb106 (diff)
set RemoteProviderID has <federation> attribute instead of text child to be a
little more compatible with lasso (still incompatible since they put all the federation in a global <federations> while I put them directly in the <identity>).
-rw-r--r--lasso/id-ff/federation.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lasso/id-ff/federation.c b/lasso/id-ff/federation.c
index 3f376264..dd62036b 100644
--- a/lasso/id-ff/federation.c
+++ b/lasso/id-ff/federation.c
@@ -64,8 +64,8 @@ lasso_federation_build_local_nameIdentifier(LassoFederation *federation,
const gchar *format,
const gchar *content)
{
- federation->local_nameIdentifier = lasso_federation_build_nameIdentifier(
- nameQualifier, format, content);
+ federation->local_nameIdentifier = lasso_federation_build_nameIdentifier(
+ nameQualifier, format, content);
}
void
@@ -139,7 +139,7 @@ get_xmlNode(LassoNode *node)
xmlSetProp(xmlnode, "Version", "2");
if (federation->remote_providerID)
- xmlNewTextChild(xmlnode, NULL, "RemoteProviderID", federation->remote_providerID);
+ xmlSetProp(xmlnode, "RemoteProviderID", federation->remote_providerID);
if (federation->local_nameIdentifier) {
t = xmlNewTextChild(xmlnode, NULL, "LocalNameIdentifier", NULL);
@@ -162,6 +162,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
LassoFederation *federation = LASSO_FEDERATION(node);
xmlNode *t, *n;
+ federation->remote_providerID = xmlGetProp(xmlnode, "RemoteProviderID");
t = xmlnode->children;
while (t) {
if (t->type != XML_ELEMENT_NODE) {
@@ -169,9 +170,6 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
continue;
}
- if (strcmp(t->name, "RemoteProviderID") == 0)
- federation->remote_providerID = xmlNodeGetContent(t);
-
if (strcmp(t->name, "LocalNameIdentifier") == 0) {
n = t->children;
while (n && n->type != XML_ELEMENT_NODE) n = n->next;