diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-09 21:26:02 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-11-12 16:34:10 +1100 |
commit | df7546ac16db6e802f8c8ef7bac6f01acc9233b2 (patch) | |
tree | 6f3d65861d90b964c920d36e066b55d2ecd8ef17 /source4/dsdb/repl/drepl_out_helpers.c | |
parent | d6563801d1783a8cb1b9740878d0a07d40085f32 (diff) | |
download | samba-df7546ac16db6e802f8c8ef7bac6f01acc9233b2.tar.gz samba-df7546ac16db6e802f8c8ef7bac6f01acc9233b2.tar.bz2 samba-df7546ac16db6e802f8c8ef7bac6f01acc9233b2.zip |
s4:dsdb/repl Split the 'convert' or 'commit' stages in the DRS import
This will allow us in future to do tests on the LDB values we generate
from the DRS replication.
Andrew Bartlett
Diffstat (limited to 'source4/dsdb/repl/drepl_out_helpers.c')
-rw-r--r-- | source4/dsdb/repl/drepl_out_helpers.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c index c86956c42f..03f8842494 100644 --- a/source4/dsdb/repl/drepl_out_helpers.c +++ b/source4/dsdb/repl/drepl_out_helpers.c @@ -375,6 +375,7 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s uint32_t linked_attributes_count; struct drsuapi_DsReplicaLinkedAttribute *linked_attributes; const struct drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector; + struct dsdb_extended_replicated_objects *objects; bool more_data = false; WERROR status; @@ -404,18 +405,27 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s return; } + status = dsdb_extended_replicated_objects_convert(service->samdb, + partition->nc.dn, + mapping_ctr, + object_count, + first_object, + linked_attributes_count, + linked_attributes, + &rf1, + uptodateness_vector, + &drsuapi->gensec_skey, + st, &objects); + if (!W_ERROR_IS_OK(status)) { + DEBUG(0,("Failed to convert objects: %s\n", win_errstr(status))); + composite_error(c, werror_to_ntstatus(status)); + return; + } + status = dsdb_extended_replicated_objects_commit(service->samdb, - partition->nc.dn, - mapping_ctr, - object_count, - first_object, - linked_attributes_count, - linked_attributes, - &rf1, - uptodateness_vector, - &drsuapi->gensec_skey, - st, NULL, + objects, &st->op->source_dsa->notify_uSN); + talloc_free(objects); if (!W_ERROR_IS_OK(status)) { DEBUG(0,("Failed to commit objects: %s\n", win_errstr(status))); composite_error(c, werror_to_ntstatus(status)); |