diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-12-18 15:16:28 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-01-01 19:28:07 +0100 |
commit | 16aef75c4f83c114206aa7637fedc9c2c2486877 (patch) | |
tree | 39e657a9821751f76a3f21e45d372ca8d0939e6c /source4/rpc_server/drsuapi | |
parent | 88833b089a90e8f685d15b508f2e4615afb3a16f (diff) | |
download | samba-16aef75c4f83c114206aa7637fedc9c2c2486877.tar.gz samba-16aef75c4f83c114206aa7637fedc9c2c2486877.tar.bz2 samba-16aef75c4f83c114206aa7637fedc9c2c2486877.zip |
s4:drsuapi: make use of LDB_TYPESAFE_QSORT() and pass getnc_state
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r-- | source4/rpc_server/drsuapi/getncchanges.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 511925a479..8ea17e5bfd 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -686,8 +686,9 @@ struct drsuapi_changed_objects { /* sort the objects we send by tree order */ -static int site_res_cmp_parent_order(struct drsuapi_changed_objects *m1, - struct drsuapi_changed_objects *m2) +static int site_res_cmp_anc_order(struct drsuapi_changed_objects *m1, + struct drsuapi_changed_objects *m2, + struct drsuapi_getncchanges_state *getnc_state) { return ldb_dn_compare(m2->dn, m1->dn); } @@ -695,8 +696,9 @@ static int site_res_cmp_parent_order(struct drsuapi_changed_objects *m1, /* sort the objects we send first by uSNChanged */ -static int site_res_cmp_dn_usn_order(struct drsuapi_changed_objects *m1, - struct drsuapi_changed_objects *m2) +static int site_res_cmp_usn_order(struct drsuapi_changed_objects *m1, + struct drsuapi_changed_objects *m2, + struct drsuapi_getncchanges_state *getnc_state) { unsigned usnchanged1, usnchanged2; unsigned cn1, cn2; @@ -1789,13 +1791,15 @@ allowed: } if (req10->replica_flags & DRSUAPI_DRS_GET_ANC) { - TYPESAFE_QSORT(changes, - getnc_state->num_records, - site_res_cmp_parent_order); + LDB_TYPESAFE_QSORT(changes, + getnc_state->num_records, + getnc_state, + site_res_cmp_anc_order); } else { - TYPESAFE_QSORT(changes, - getnc_state->num_records, - site_res_cmp_dn_usn_order); + LDB_TYPESAFE_QSORT(changes, + getnc_state->num_records, + getnc_state, + site_res_cmp_usn_order); } for (i=0; i < getnc_state->num_records; i++) { |