diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-02 12:20:18 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-02 12:20:18 +0000 |
| commit | a3654f9a6fc21dc481caf88f2e17b719fcabc436 (patch) | |
| tree | d41e9fc0af985bc8fb3954da2d74af506b70d8ff | |
| parent | 757f7416a54186420fca3c66885297a212590bf9 (diff) | |
| download | lasso-a3654f9a6fc21dc481caf88f2e17b719fcabc436.tar.gz lasso-a3654f9a6fc21dc481caf88f2e17b719fcabc436.tar.xz lasso-a3654f9a6fc21dc481caf88f2e17b719fcabc436.zip | |
Fixed 2 bugs in lasso_node_impl_add_child() and lasso_node_impl_add_child() methods
| -rw-r--r-- | lasso/xml/xml.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index c31a3e4e..8958db2e 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -943,6 +943,7 @@ lasso_node_impl_add_child(LassoNode *node, { xmlNodePtr old_child = NULL; LassoNode *search_child = NULL; + xmlChar *href = NULL; gint i; g_return_if_fail (LASSO_IS_NODE(node)); @@ -950,9 +951,12 @@ lasso_node_impl_add_child(LassoNode *node, /* if child is not unbounded, we search it */ if (!unbounded) { + if (node->private->node->ns != NULL) { + href = node->private->node->ns->href; + } old_child = xmlSecFindNode(node->private->node, child->private->node->name, - child->private->node->ns->href); + href); } if (!unbounded && old_child != NULL) { @@ -1071,14 +1075,18 @@ lasso_node_impl_new_child(LassoNode *node, { //LassoNode *old_child = NULL; xmlNodePtr old_child = NULL; + xmlChar *href = NULL; g_return_if_fail (LASSO_IS_NODE(node)); g_return_if_fail (name != NULL); g_return_if_fail (content != NULL); if (!unbounded) { + if (node->private->node->ns != NULL) { + href = node->private->node->ns->href; + } old_child = xmlSecFindNode(node->private->node, name, - node->private->node->ns->href); + href); //old_child = lasso_node_get_child(node, name); } |
