summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-09-10 01:58:07 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-09-10 13:08:22 +0300
commit750300aedf0bd59b704e222f82ff1d114d2b5da7 (patch)
tree532009620545ee004ab1dbb79ccee32e53612af4 /source4
parent62b52748273b6d02d9acb3efe4956db4735b4322 (diff)
downloadsamba-750300aedf0bd59b704e222f82ff1d114d2b5da7.tar.gz
samba-750300aedf0bd59b704e222f82ff1d114d2b5da7.tar.bz2
samba-750300aedf0bd59b704e222f82ff1d114d2b5da7.zip
s4-drs-fsmo: try to dispatch ops in queue as soon as possible
In most cases this will transfer of schema master role to look like a synchronous operation.
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/repl/drepl_fsmo.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/dsdb/repl/drepl_fsmo.c b/source4/dsdb/repl/drepl_fsmo.c
index 8719967d16..941ad6771b 100644
--- a/source4/dsdb/repl/drepl_fsmo.c
+++ b/source4/dsdb/repl/drepl_fsmo.c
@@ -126,12 +126,20 @@ WERROR dreplsrv_fsmo_role_check(struct dreplsrv_service *service,
return WERR_DS_DRA_INTERNAL_ERROR;
}
if (!fsmo_master_cmp(ntds_dn, fsmo_role_dn)) {
- return drepl_request_extended_op(service,
+ WERROR werr;
+ werr = drepl_request_extended_op(service,
role_owner_dn,
fsmo_role_dn,
DRSUAPI_EXOP_FSMO_REQ_ROLE,
alloc_pool,
drepl_role_callback);
+ if (W_ERROR_IS_OK(werr)) {
+ dreplsrv_run_pending_ops(service);
+ } else {
+ DEBUG(0,("%s: drepl_request_extended_op() failed with %s",
+ __FUNCTION__, win_errstr(werr)));
+ }
+ return werr;
}
break;
case DREPL_PDC_MASTER: