From: <dg...@su...> - 2009-01-11 19:10:59
|
Author: dgollub Date: Sun Jan 11 20:10:17 2009 New Revision: 5116 URL: http://www.opensync.org/changeset/5116 Log: More heavy trace instrumentation to track where a xmlfield differes. Modified: format-plugins/xmlformat/trunk/src/xmlformat_compare.c Modified: format-plugins/xmlformat/trunk/src/xmlformat_compare.c ============================================================================== --- format-plugins/xmlformat/trunk/src/xmlformat_compare.c Sun Jan 11 19:05:32 2009 (r5115) +++ format-plugins/xmlformat/trunk/src/xmlformat_compare.c Sun Jan 11 20:10:17 2009 (r5116) @@ -119,6 +119,7 @@ } if(key1 == NULL || key2 == NULL) { + osync_trace(TRACE_INTERNAL, "At least one key is empty. key1:%p key2:%p", key1, key2); same = FALSE; break; } @@ -146,7 +147,7 @@ /* both lists must have the same length */ if(g_slist_length(keylist1) != g_slist_length(keylist2)) { - osync_trace(TRACE_INTERNAL, "It's not the same anymore..."); + osync_trace(TRACE_INTERNAL, "It's not the same anymore. Differnt list length."); same = FALSE; break; } @@ -160,6 +161,7 @@ break; cur_list2 = g_slist_next(cur_list2); if(cur_list2 == NULL) { + osync_trace(TRACE_INTERNAL, "Run out of list2 elements. Different."); same = FALSE; break; } @@ -191,6 +193,7 @@ if(i1 != i2) { same = FALSE; + osync_trace(TRACE_INTERNAL, "Attribute count different: %d != %d\n", i1, i2); break; } @@ -198,6 +201,15 @@ const char *attrvalue = osync_xmlfield_get_attr(xmlfield2, osync_xmlfield_get_nth_attr_name(xmlfield1, i)); if( attrvalue == NULL || strcmp(attrvalue, osync_xmlfield_get_nth_attr_value(xmlfield1, i))) { + osync_trace(TRACE_INTERNAL, "Attribute mismatch (%s/%s)", + __NULLSTR(osync_xmlfield_get_nth_attr_name(xmlfield1, i)), + __NULLSTR(osync_xmlfield_get_nth_attr_name(xmlfield2, i))); + osync_trace(TRACE_SENSITIVE, "Attribute mismatch values\n" + "xmlfield1: %s\n" + "xmlfield2: %s\n", + __NULLSTR(osync_xmlfield_get_nth_attr_value(xmlfield1, i)), + __NULLSTR(osync_xmlfield_get_nth_attr_value(xmlfield2, i))); + same = FALSE; break; } |