Changeset 124

Show
Ignore:
Timestamp:
04/12/06 22:19:21 (3 years ago)
Author:
abauer
Message:

Updated the wbxml patch to fix another problem

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/development-branch/misc/wbxml2-0.9.0.patch

    r39 r124  
    9595     return parse_element(parser); 
    9696 } 
     97diff -u wbxml2-0.9.0/src/wbxml_tree.c ../wbxml2-0.9.0/src/wbxml_tree.c 
     98--- wbxml2-0.9.0/src/wbxml_tree.c       2004-02-25 18:57:14.000000000 +0100 
     99+++ ../wbxml2-0.9.0/src//wbxml_tree.c   2006-04-12 11:37:32.000000000 +0200 
     100@@ -296,6 +296,7 @@ 
     101 WBXML_DECLARE(WBXMLSyncMLDataType) wbxml_tree_node_get_syncml_data_type(WBXMLTreeNode *node) 
     102 { 
     103     WBXMLTreeNode *tmp_node = NULL; 
     104+    WBXMLTreeNode *meta_tmp_node = NULL; 
     105  
     106     if (node == NULL) 
     107         return WBXML_SYNCML_DATA_TYPE_NORMAL; 
     108@@ -306,18 +307,14 @@ 
     109         (WBXML_STRCMP(wbxml_tag_get_xml_name(node->name), "Data") == 0)) 
     110     { 
     111         /* Go to Parent element (or Parent of Parent) and search for <Meta> */ 
     112-        if (((node->parent != NULL) &&  
     113-             (node->parent->children != NULL) &&  
     114-             ((tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->children, "Meta", FALSE)) != NULL)) || 
     115-            ((node->parent != NULL) &&  
     116-             (node->parent->parent != NULL) &&  
     117-             (node->parent->parent->children != NULL) &&  
     118-             ((tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->parent->children, "Meta", FALSE)) != NULL)))  
     119+        if ((node->parent != NULL && node->parent->children != NULL &&  
     120+               (((meta_tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->children, "Meta", FALSE)) != NULL && 
     121+               (tmp_node = wbxml_tree_node_elt_get_from_name(meta_tmp_node->children, "Type", FALSE)) != NULL) || 
     122+               (node->parent != NULL && node->parent->parent != NULL && node->parent->parent->children != NULL &&  
     123+               (meta_tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->parent->children, "Meta", FALSE)) != NULL && 
     124+               (tmp_node = wbxml_tree_node_elt_get_from_name(meta_tmp_node->children, "Type", FALSE)) != NULL)))) 
     125         { 
     126-            /* Search for <Type> */ 
     127-            if ((tmp_node = wbxml_tree_node_elt_get_from_name(tmp_node->children, "Type", FALSE)) != NULL)  
     128-            { 
     129-                /* Check <Type> value */ 
     130+               /* Check <Type> value */ 
     131                 if ((tmp_node->children != NULL) && (tmp_node->children->type == WBXML_TREE_TEXT_NODE)) { 
     132                     /* application/vnd.syncml-devinf+wbxml */ 
     133                     if (wbxml_buffer_compare_cstr(tmp_node->children->content, "application/vnd.syncml-devinf+wbxml") == 0) { 
     134@@ -344,7 +341,6 @@ 
     135                                            return WBXML_SYNCML_DATA_TYPE_VCALENDAR; 
     136                                        } 
     137                 } 
     138-            } 
     139         } 
     140     } 
     141