Ticket #1168 (closed defect: fixed)
Capabilities should be sorted.
| Reported by: | henrik | Owned by: | dgollub |
|---|---|---|---|
| Priority: | highest | Milestone: | OpenSync 0.40 |
| Component: | OpenSync | Version: | 0.39 |
| Severity: | blocker | Keywords: | |
| Cc: |
Description
xmlformat_merge.c contains this code:
rc = strcmp(osync_xmlfield_get_name(cur_xmlfield), osync_capability_get_name(cur_capability));
if(rc == 0) {
/* check the secound level here */
[...]
}
if(rc > 0) {
caplist = caplist->next;
cur_capability = caplist->data;
continue;
}
if(rc < 0) {
/* delete xmlfield */
[...]
}
This logic can only work if the capabilities are sorted. However, osync_capabilities_sort does not seem to be called anywhere! So, as it is now, the capability handling is broken.
I do not know if the call(s) to osync_capabilities_sort should be inserted in osync_capabilities_load or maybe somewhere else.
Change History
Note: See
TracTickets for help on using
tickets.

(In [5870]) demerge_xmlformat in xmlformat_merge.c requires capabilities to be sorted. So now we sort them before saving. Fixes bug 1168