summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-06-27 01:41:26 +0200
committerGünther Deschner <gd@samba.org>2008-06-27 02:01:15 +0200
commit46dd2d77ecad82bcc296a0023f344a40b8a9992f (patch)
treead718f5162d2d19e9ac4e76c9ad16bb846fdc4a0 /source3
parente58b2db024293b0d76441e19e0afd4734b550aa8 (diff)
downloadsamba-46dd2d77ecad82bcc296a0023f344a40b8a9992f.tar.gz
samba-46dd2d77ecad82bcc296a0023f344a40b8a9992f.tar.bz2
samba-46dd2d77ecad82bcc296a0023f344a40b8a9992f.zip
libnet_dssync: add last_query flag to processing routine.
Guenther (This used to be commit 22bdee7fe0cdcd95e0bade70cacb095e0b348abf)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_dssync.c20
-rw-r--r--source3/libnet/libnet_dssync.h1
2 files changed, 17 insertions, 4 deletions
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c
index b596da816a..87d5e8aade 100644
--- a/source3/libnet/libnet_dssync.c
+++ b/source3/libnet/libnet_dssync.c
@@ -366,6 +366,8 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
for (y=0; ;y++) {
+ bool last_query = true;
+
if (level == 8) {
DEBUG(1,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
(long long)req.req8.highwatermark.tmp_highest_usn,
@@ -416,10 +418,16 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
&ctx->session_key,
ctr1->first_object);
+ if (ctr1->new_highwatermark.tmp_highest_usn > ctr1->new_highwatermark.highest_usn) {
+ req.req5.highwatermark = ctr1->new_highwatermark;
+ last_query = false;
+ }
+
if (ctx->processing_fn) {
status = ctx->processing_fn(mem_ctx,
ctr1->first_object,
&ctr1->mapping_ctr,
+ last_query,
ctx);
if (!NT_STATUS_IS_OK(status)) {
ctx->error_message = talloc_asprintf(mem_ctx,
@@ -429,8 +437,7 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
}
}
- if (ctr1->new_highwatermark.tmp_highest_usn > ctr1->new_highwatermark.highest_usn) {
- req.req5.highwatermark = ctr1->new_highwatermark;
+ if (!last_query) {
continue;
}
}
@@ -454,10 +461,16 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
&ctx->session_key,
ctr6->first_object);
+ if (ctr6->new_highwatermark.tmp_highest_usn > ctr6->new_highwatermark.highest_usn) {
+ req.req8.highwatermark = ctr6->new_highwatermark;
+ last_query = false;
+ }
+
if (ctx->processing_fn) {
status = ctx->processing_fn(mem_ctx,
ctr6->first_object,
&ctr6->mapping_ctr,
+ last_query,
ctx);
if (!NT_STATUS_IS_OK(status)) {
ctx->error_message = talloc_asprintf(mem_ctx,
@@ -467,8 +480,7 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
}
}
- if (ctr6->new_highwatermark.tmp_highest_usn > ctr6->new_highwatermark.highest_usn) {
- req.req8.highwatermark = ctr6->new_highwatermark;
+ if (!last_query) {
continue;
}
}
diff --git a/source3/libnet/libnet_dssync.h b/source3/libnet/libnet_dssync.h
index 0705996976..6a56566c19 100644
--- a/source3/libnet/libnet_dssync.h
+++ b/source3/libnet/libnet_dssync.h
@@ -22,6 +22,7 @@ struct dssync_context;
typedef NTSTATUS (*dssync_processing_fn_t)(TALLOC_CTX *,
struct drsuapi_DsReplicaObjectListItemEx *,
struct drsuapi_DsReplicaOIDMapping_Ctr *,
+ bool,
struct dssync_context *ctx);
struct dssync_context {