summaryrefslogtreecommitdiff
path: root/source4/rpc_server/drsuapi
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-12 12:42:40 +1000
committerAndrew Tridgell <tridge@samba.org>2009-09-12 12:42:40 +1000
commit493166b0094b973f7ed6fa98ed66eb0ffebc1447 (patch)
tree19f1abf930f9a31715407847bcc296fb8860e746 /source4/rpc_server/drsuapi
parent0819e79c4fdbd937e4b9516a1ff2ed8439cc8830 (diff)
downloadsamba-493166b0094b973f7ed6fa98ed66eb0ffebc1447.tar.gz
samba-493166b0094b973f7ed6fa98ed66eb0ffebc1447.tar.bz2
samba-493166b0094b973f7ed6fa98ed66eb0ffebc1447.zip
s4-drs: return objects with uSN > highest_usn
When the client tells us the highest_usn they have is N, then we want to send them objects with usn>N, not>=N, as otherwise we end up sending them the same object (the one with the highest uSN) again and again.
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 7183b2f45b..4cd71addf0 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -316,7 +316,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
ret = drsuapi_search_with_extended_dn(sam_ctx, mem_ctx, &site_res,
ncRoot_dn, LDB_SCOPE_SUBTREE, attrs,
"uSNChanged>=%llu",
- (unsigned long long)r->in.req->req8.highwatermark.highest_usn);
+ (unsigned long long)(r->in.req->req8.highwatermark.highest_usn+1));
if (ret != LDB_SUCCESS) {
return WERR_DS_DRA_INTERNAL_ERROR;
}
@@ -391,8 +391,12 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
DEBUG(4,("DsGetNCChanges with uSNChanged >= %llu on %s gave %u objects\n",
- (unsigned long long)r->in.req->req8.highwatermark.highest_usn,
+ (unsigned long long)(r->in.req->req8.highwatermark.highest_usn+1),
ncRoot->dn, r->out.ctr->ctr6.object_count));
+ if (r->out.ctr->ctr6.object_count <= 10 && DEBUGLVL(6)) {
+ NDR_PRINT_FUNCTION_DEBUG(drsuapi_DsGetNCChanges, NDR_IN|NDR_OUT, r);
+ }
+
return WERR_OK;
}