From: <svn...@op...> - 2010-01-10 14:57:27
|
Author: dgollub Date: Sun Jan 10 15:57:16 2010 New Revision: 5980 URL: http://www.opensync.org/changeset/5980 Log: Applied patch from paule, scriptor which introduces sorting for XMLFormat plugin. In future versions we should try to find a way to avoid sorting as often as possible. fixes #923 Modified: format-plugins/xmlformat/trunk/src/xmlformat.c Modified: format-plugins/xmlformat/trunk/src/xmlformat.c ============================================================================== --- format-plugins/xmlformat/trunk/src/xmlformat.c Wed Jan 6 21:53:30 2010 (r5979) +++ format-plugins/xmlformat/trunk/src/xmlformat.c Sun Jan 10 15:57:16 2010 (r5980) @@ -67,6 +67,11 @@ return FALSE; } + if(!osync_xmlformat_sort(xmlformat, error)) { + osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); + return FALSE; + } + *output = (char *) xmlformat; *outpsize = osync_xmlformat_size(); @@ -303,6 +308,9 @@ osync_trace(TRACE_ENTRY, "%s(%p, %u, %p, %p)", __func__, data, size, attribute, error); + if (!osync_xmlformat_sort((OSyncXMLFormat *)data, error)) + goto error; + fieldlist = osync_xmlformat_search_field((OSyncXMLFormat *)data, attribute, error, NULL); if (!fieldlist) goto error; |