Fixed a problem caused by recent sorting patches that made "ordered-by user" lists fail in some cases, causing multiple list entries with same keys. NACM being one example. Thanks vratnikov!

This commit is contained in:
Olof hagsand 2019-04-29 16:31:38 +02:00
parent 6bf2a74e24
commit 220a872188
3 changed files with 21 additions and 4 deletions

View file

@ -416,11 +416,9 @@ xml_search1(cxobj *xp,
cmp = yangi-yang_order(y);
/* Here is right yang order == same yang? */
if (cmp == 0){
if (userorder){
cmp = xml_cmp(x1, xc, 0);
if (cmp && userorder) /* Ordered by user (if not equal) */
return xml_search_userorder(xp, x1, y, yangi, mid);
}
else /* Ordered by system */
cmp = xml_cmp(x1, xc, 0);
}
if (cmp == 0)
return xc;