summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl/drepl_fsmo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-15 16:15:12 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-16 07:24:00 +1000
commit54b53704747f45757642c9d4a17645ac777dc9ea (patch)
tree80271f7d3c4ea3e81b0b4ab6224c7c75759dbe21 /source4/dsdb/repl/drepl_fsmo.c
parent7f1db0d8df6c5b68c9eb9a2d578ce79a43ce0719 (diff)
downloadsamba-54b53704747f45757642c9d4a17645ac777dc9ea.tar.gz
samba-54b53704747f45757642c9d4a17645ac777dc9ea.tar.bz2
samba-54b53704747f45757642c9d4a17645ac777dc9ea.zip
s4-repl: cleanup getncchanges extended op calls
Multiple calls are allowed to run in parallel as long as they don't conflict. This also cleans up the variable names in the extended op calls. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/repl/drepl_fsmo.c')
-rw-r--r--source4/dsdb/repl/drepl_fsmo.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source4/dsdb/repl/drepl_fsmo.c b/source4/dsdb/repl/drepl_fsmo.c
index a389c39bf2..63b831669a 100644
--- a/source4/dsdb/repl/drepl_fsmo.c
+++ b/source4/dsdb/repl/drepl_fsmo.c
@@ -43,9 +43,7 @@ static void drepl_role_callback(struct dreplsrv_service *service,
} else {
DEBUG(0,(__location__ ": Successful role transfer\n"));
}
- talloc_free(service->ncchanges_extended.role_owner_source_dsa);
- service->ncchanges_extended.role_owner_source_dsa = NULL;
- service->ncchanges_extended.in_progress = false;
+ service->role_transfer_in_progress = false;
}
static bool fsmo_master_cmp(struct ldb_dn *ntds_dn, struct ldb_dn *role_owner_dn)
@@ -67,13 +65,14 @@ WERROR dreplsrv_fsmo_role_check(struct dreplsrv_service *service,
TALLOC_CTX *tmp_ctx = talloc_new(service);
struct ldb_context *ldb = service->samdb;
int ret;
- uint64_t alloc_pool = 0;
+ uint64_t fsmo_info = 0;
enum drsuapi_DsExtendedOperation extended_op = DRSUAPI_EXOP_NONE;
WERROR werr;
- if (service->ncchanges_extended.in_progress) {
+ if (service->role_transfer_in_progress) {
talloc_free(tmp_ctx);
- return WERR_OK;
+ /* should we allow these in parallel? */
+ return WERR_DS_DRA_REPL_PENDING;
}
ntds_dn = samdb_ntds_settings_dn(ldb);
@@ -158,7 +157,7 @@ WERROR dreplsrv_fsmo_role_check(struct dreplsrv_service *service,
fsmo_role_dn,
role_owner_dn,
extended_op,
- alloc_pool,
+ fsmo_info,
drepl_role_callback);
if (W_ERROR_IS_OK(werr)) {
dreplsrv_run_pending_ops(service);