summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2005-01-12 16:01:08 +0000
committerFrederic Peters <fpeters@entrouvert.com>2005-01-12 16:01:08 +0000
commit4ef4465bad54e7dfc5a138a54fbda02443319fcb (patch)
tree7b6592d0e610684b87dc1e727b86c29725515d2b
parent18731728ef22a69ae7020cea69438173b03d24c5 (diff)
remove duplicate declaration of namespace (bug#398)
-rw-r--r--lasso/id-ff/server.c2
-rw-r--r--lasso/xml/private.h2
-rw-r--r--lasso/xml/xml.c7
3 files changed, 7 insertions, 4 deletions
diff --git a/lasso/id-ff/server.c b/lasso/id-ff/server.c
index efe87453..cefdb5cb 100644
--- a/lasso/id-ff/server.c
+++ b/lasso/id-ff/server.c
@@ -162,6 +162,8 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
(GHFunc)add_service_childnode, t);
}
+ xmlCleanNs(xmlnode);
+
return xmlnode;
}
diff --git a/lasso/xml/private.h b/lasso/xml/private.h
index a2b595bb..13ff37b7 100644
--- a/lasso/xml/private.h
+++ b/lasso/xml/private.h
@@ -111,6 +111,8 @@ char** urlencoded_to_strings(const char *str);
int lasso_sign_node(xmlNode *xmlnode, const char *id_attr_name, const char *id_value,
const char *private_key_file, const char *certificate_file);
+void xmlCleanNs(xmlNode *root_node);
+
void _debug(GLogLevelFlags level, const char *filename, int line,
const char *function, const char *format, ...);
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c
index 508cbbba..62889940 100644
--- a/lasso/xml/xml.c
+++ b/lasso/xml/xml.c
@@ -51,8 +51,6 @@ static
void lasso_node_add_signature_template(LassoNode *node, xmlNode *xmlnode,
struct XmlSnippet *snippet_signature);
-static void xmlCleanNs(xmlNode *root_node);
-
/*****************************************************************************/
/* virtual public methods */
/*****************************************************************************/
@@ -1287,8 +1285,9 @@ xmlUseNsDef(xmlNs *ns, xmlNode *node)
xmlNode *t;
xmlNs *ns2, *ns3;
- if (sameNs(ns, node->ns))
+ if (sameNs(ns, node->ns)) {
node->ns = ns;
+ }
for (t = node->children; t; t = t->next) {
if (t->type == XML_ELEMENT_NODE)
@@ -1317,7 +1316,7 @@ xmlUseNsDef(xmlNs *ns, xmlNode *node)
* xmlCleanNs removes duplicate xml namespace declarations and merge them on
* the @root_node.
**/
-static void
+void
xmlCleanNs(xmlNode *root_node)
{
xmlNs *ns;