1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

drsuapi: make use of the 'more_data' field in DsGetNCChangesCtr[1|6]

metze
This commit is contained in:
Stefan Metzmacher 2008-07-16 13:01:56 +02:00
parent 511847f5f5
commit 35c7fa470a
6 changed files with 14 additions and 15 deletions

View File

@ -365,6 +365,7 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s
linked_attributes = NULL;
rf1.highwatermark = ctr1->new_highwatermark;
uptodateness_vector = NULL; /* TODO: map it */
more_data = ctr1->more_data;
break;
case 6:
mapping_ctr = &ctr6->mapping_ctr;
@ -374,6 +375,7 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s
linked_attributes = ctr6->linked_attributes;
rf1.highwatermark = ctr6->new_highwatermark;
uptodateness_vector = ctr6->uptodateness_vector;
more_data = ctr6->more_data;
break;
default:
composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
@ -404,14 +406,6 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s
* TODO: update our uptodatevector!
*/
/*
* if the tmp_highest_usn is higher than highest_usn
* there's more to pull from this source_dsa
*/
if (rf1.highwatermark.tmp_highest_usn > rf1.highwatermark.highest_usn) {
more_data = true;
}
if (more_data) {
dreplsrv_op_pull_source_get_changes_send(st);
return;

View File

@ -2434,6 +2434,7 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
struct GUID *source_dsa_guid;
struct GUID *source_dsa_invocation_id;
struct drsuapi_DsReplicaHighWaterMark *new_highwatermark;
bool more_data = false;
NTSTATUS nt_status;
if (!W_ERROR_IS_OK(r->out.result)) {
@ -2474,17 +2475,20 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
source_dsa_guid = &ctr1->source_dsa_guid;
source_dsa_invocation_id = &ctr1->source_dsa_invocation_id;
new_highwatermark = &ctr1->new_highwatermark;
more_data = ctr1->more_data;
break;
case 6:
source_dsa_guid = &ctr6->source_dsa_guid;
source_dsa_invocation_id = &ctr6->source_dsa_invocation_id;
new_highwatermark = &ctr6->new_highwatermark;
more_data = ctr6->more_data;
break;
}
partition->highwatermark = *new_highwatermark;
partition->source_dsa_guid = *source_dsa_guid;
partition->source_dsa_invocation_id = *source_dsa_invocation_id;
partition->more_data = more_data;
if (!partition->store_chunk) return WERR_OK;
@ -2565,7 +2569,7 @@ static void becomeDC_drsuapi3_pull_schema_recv(struct rpc_request *req)
talloc_free(r);
if (s->schema_part.highwatermark.tmp_highest_usn > s->schema_part.highwatermark.highest_usn) {
if (s->schema_part.more_data) {
becomeDC_drsuapi_pull_partition_send(s, &s->drsuapi2, &s->drsuapi3, &s->schema_part,
becomeDC_drsuapi3_pull_schema_recv);
return;
@ -2627,7 +2631,7 @@ static void becomeDC_drsuapi3_pull_config_recv(struct rpc_request *req)
talloc_free(r);
if (s->config_part.highwatermark.tmp_highest_usn > s->config_part.highwatermark.highest_usn) {
if (s->config_part.more_data) {
becomeDC_drsuapi_pull_partition_send(s, &s->drsuapi2, &s->drsuapi3, &s->config_part,
becomeDC_drsuapi3_pull_config_recv);
return;
@ -2694,7 +2698,7 @@ static void becomeDC_drsuapi3_pull_domain_recv(struct rpc_request *req)
talloc_free(r);
if (s->domain_part.highwatermark.tmp_highest_usn > s->domain_part.highwatermark.highest_usn) {
if (s->domain_part.more_data) {
becomeDC_drsuapi_pull_partition_send(s, &s->drsuapi2, &s->drsuapi3, &s->domain_part,
becomeDC_drsuapi3_pull_domain_recv);
return;

View File

@ -94,6 +94,7 @@ struct libnet_BecomeDC_Partition {
struct GUID source_dsa_guid;
struct GUID source_dsa_invocation_id;
struct drsuapi_DsReplicaHighWaterMark highwatermark;
bool more_data;
uint32_t replica_flags;
NTSTATUS (*store_chunk)(void *private_data,

View File

@ -426,7 +426,7 @@ static NTSTATUS vampire_schema_chunk(void *private_data,
for (cur = first_object; cur->next_object; cur = cur->next_object) {}
s->schema_part.last_object = cur;
if (c->partition->highwatermark.tmp_highest_usn == c->partition->highwatermark.highest_usn) {
if (!c->partition->more_data) {
return vampire_apply_schema(s, c);
}

View File

@ -416,7 +416,7 @@ static NTSTATUS test_become_dc_schema_chunk(void *private_data,
for (cur = first_object; cur->next_object; cur = cur->next_object) {}
s->schema_part.last_object = cur;
if (c->partition->highwatermark.tmp_highest_usn == c->partition->highwatermark.highest_usn) {
if (!c->partition->more_data) {
return test_apply_schema(s, c);
}

View File

@ -711,7 +711,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
test_analyse_objects(tctx, ctx, &gensec_skey, ctr1->first_object);
if (ctr1->new_highwatermark.tmp_highest_usn > ctr1->new_highwatermark.highest_usn) {
if (ctr1->more_data) {
r.in.req.req5.highwatermark = ctr1->new_highwatermark;
continue;
}
@ -739,7 +739,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
test_analyse_objects(tctx, ctx, &gensec_skey, ctr6->first_object);
if (ctr6->new_highwatermark.tmp_highest_usn > ctr6->new_highwatermark.highest_usn) {
if (ctr6->more_data) {
r.in.req.req8.highwatermark = ctr6->new_highwatermark;
continue;
}