Ticket #1168 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

comment:1 Changed 2 years ago by henrik

  • Status changed from new to closed
  • Resolution set to fixed

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

Note: See TracTickets for help on using tickets.