summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-17 16:34:25 +0100
committerStefan Metzmacher <metze@samba.org>2013-01-01 19:28:07 +0100
commit02de5b140cfe6ea31e0686e5f0ff726a22153020 (patch)
tree300e65ed3691220d675113b501e5b7cbcdecd010 /source4/rpc_server
parent025c6d62f3c1b0f760aaacb7b3960135319031da (diff)
downloadsamba-02de5b140cfe6ea31e0686e5f0ff726a22153020.tar.gz
s4:drsuapi: always use the current uptodateness_vector
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 7ed47f13cab..b3ceb50db71 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -50,7 +50,6 @@ struct drsuapi_getncchanges_state {
uint32_t la_count;
bool la_sorted;
uint32_t la_idx;
- struct drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
};
/*
@@ -1730,14 +1729,6 @@ allowed:
site_res_cmp_dn_usn_order);
}
- getnc_state->uptodateness_vector = talloc_steal(getnc_state, req10->uptodateness_vector);
- if (getnc_state->uptodateness_vector) {
- /* make sure its sorted */
- TYPESAFE_QSORT(getnc_state->uptodateness_vector->cursors,
- getnc_state->uptodateness_vector->count,
- drsuapi_DsReplicaCursor_compare);
- }
-
for (i=0; i < getnc_state->num_records; i++) {
getnc_state->guids[i] = changes[i].guid;
if (GUID_all_zero(&getnc_state->guids[i])) {
@@ -1751,6 +1742,13 @@ allowed:
talloc_free(changes);
}
+ if (req10->uptodateness_vector) {
+ /* make sure its sorted */
+ TYPESAFE_QSORT(req10->uptodateness_vector->cursors,
+ req10->uptodateness_vector->count,
+ drsuapi_DsReplicaCursor_compare);
+ }
+
/* Prefix mapping */
schema = dsdb_get_schema(sam_ctx, mem_ctx);
if (!schema) {
@@ -1852,7 +1850,7 @@ allowed:
schema, &session_key, getnc_state->min_usn,
req10->replica_flags,
req10->partial_attribute_set,
- getnc_state->uptodateness_vector,
+ req10->uptodateness_vector,
req10->extended_op,
max_wait_reached);
if (!W_ERROR_IS_OK(werr)) {
@@ -1866,7 +1864,7 @@ allowed:
msg,
&getnc_state->la_list,
&getnc_state->la_count,
- getnc_state->uptodateness_vector);
+ req10->uptodateness_vector);
if (!W_ERROR_IS_OK(werr)) {
return werr;
}