[gupnp-av/wip/didl-lite-fragments] Make sure that new additions are really added next to last sibling.



commit a875e9bc63c4ef3f801c19292113aff056feea05
Author: Krzesimir Nowak <krnowak openismus com>
Date:   Wed Oct 24 17:56:42 2012 +0200

    Make sure that new additions are really added next to last sibling.

 libgupnp-av/fragment-util.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgupnp-av/fragment-util.c b/libgupnp-av/fragment-util.c
index 2ad12fa..15a8734 100644
--- a/libgupnp-av/fragment-util.c
+++ b/libgupnp-av/fragment-util.c
@@ -241,7 +241,7 @@ apply_temporary_addition (DocNode    *modified,
 
         xmlUnlinkNode (new_node_copy);
 
-        if (xmlAddSibling (mod_sibling, new_node_copy) == NULL) {
+        if (xmlAddNextSibling (mod_sibling, new_node_copy) == NULL) {
                 xmlFreeNode (new_node_copy);
 
                 return GUPNP_DIDL_LITE_FRAGMENT_RESULT_UNKNOWN_ERROR;
@@ -553,7 +553,7 @@ new_doc_is_valid_modification (DocNode   *modified,
         }
         if (last_sibling == NULL) {
                 if (modified->node->children != NULL)
-                        last_sibling = modified->node->children;
+                        last_sibling = modified->node->last;
                 else
                         /* We expect that modified object has some
                          * required tags like <upnp:class> or



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]