summaryrefslogtreecommitdiff
path: root/source4/rpc_server/drsuapi
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-17 11:13:43 +0100
committerStefan Metzmacher <metze@samba.org>2013-01-01 19:28:07 +0100
commit7e511b58318cef1b325a8191685ee156a7fc0cb7 (patch)
tree28599318707e5871587be21483b05ab584388379 /source4/rpc_server/drsuapi
parent02de5b140cfe6ea31e0686e5f0ff726a22153020 (diff)
downloadsamba-7e511b58318cef1b325a8191685ee156a7fc0cb7.tar.gz
samba-7e511b58318cef1b325a8191685ee156a7fc0cb7.tar.bz2
samba-7e511b58318cef1b325a8191685ee156a7fc0cb7.zip
s4:drsuapi: add drsuapi_DsReplicaHighWaterMark_cmp()
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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index b3ceb50db7..1f597c606d 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -52,6 +52,26 @@ struct drsuapi_getncchanges_state {
uint32_t la_idx;
};
+static int drsuapi_DsReplicaHighWaterMark_cmp(const struct drsuapi_DsReplicaHighWaterMark *h1,
+ const struct drsuapi_DsReplicaHighWaterMark *h2)
+{
+ if (h1->highest_usn < h2->highest_usn) {
+ return -1;
+ } else if (h1->highest_usn > h2->highest_usn) {
+ return 1;
+ } else if (h1->tmp_highest_usn < h2->tmp_highest_usn) {
+ return -1;
+ } else if (h1->tmp_highest_usn > h2->tmp_highest_usn) {
+ return 1;
+ } else if (h1->reserved_usn < h2->reserved_usn) {
+ return -1;
+ } else if (h1->reserved_usn > h2->reserved_usn) {
+ return 1;
+ }
+
+ return 0;
+}
+
/*
build a DsReplicaObjectIdentifier from a ldb msg
*/