mirror of
https://github.com/samba-team/samba.git
synced 2025-08-30 17:49:30 +03:00
s4:rpc_srv:getncchanges: USN sort uses qsort() instead of ldb_qsort()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
65df8ce05c
commit
c5c29f59fa
@ -1035,8 +1035,7 @@ static int site_res_cmp_anc_order(struct drsuapi_changed_objects *m1,
|
|||||||
sort the objects we send first by uSNChanged
|
sort the objects we send first by uSNChanged
|
||||||
*/
|
*/
|
||||||
static int site_res_cmp_usn_order(struct drsuapi_changed_objects *m1,
|
static int site_res_cmp_usn_order(struct drsuapi_changed_objects *m1,
|
||||||
struct drsuapi_changed_objects *m2,
|
struct drsuapi_changed_objects *m2)
|
||||||
struct drsuapi_getncchanges_state *getnc_state)
|
|
||||||
{
|
{
|
||||||
if (m1->usn == m2->usn) {
|
if (m1->usn == m2->usn) {
|
||||||
return ldb_dn_compare(m2->dn, m1->dn);
|
return ldb_dn_compare(m2->dn, m1->dn);
|
||||||
@ -3325,10 +3324,9 @@ allowed:
|
|||||||
getnc_state->num_records,
|
getnc_state->num_records,
|
||||||
site_res_cmp_anc_order);
|
site_res_cmp_anc_order);
|
||||||
} else {
|
} else {
|
||||||
LDB_TYPESAFE_QSORT(changes,
|
TYPESAFE_QSORT(changes,
|
||||||
getnc_state->num_records,
|
getnc_state->num_records,
|
||||||
getnc_state,
|
site_res_cmp_usn_order);
|
||||||
site_res_cmp_usn_order);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i < getnc_state->num_records; i++) {
|
for (i=0; i < getnc_state->num_records; i++) {
|
||||||
|
Reference in New Issue
Block a user