diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-01-06 17:16:58 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-01-08 13:03:01 +1100 |
commit | cc7967b1c0555ba7641fb0248077295521f74943 (patch) | |
tree | 481229e171eccde475b927cbbca8c7634d2a67f0 /source4/dsdb/repl/drepl_out_pull.c | |
parent | 7a40cacbde0dc707ac2d354bfb335312f420da4b (diff) | |
download | samba-cc7967b1c0555ba7641fb0248077295521f74943.tar.gz samba-cc7967b1c0555ba7641fb0248077295521f74943.tar.bz2 samba-cc7967b1c0555ba7641fb0248077295521f74943.zip |
s4-repl: allow for callbacks when a repl operation completes
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/repl/drepl_out_pull.c')
-rw-r--r-- | source4/dsdb/repl/drepl_out_pull.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/dsdb/repl/drepl_out_pull.c b/source4/dsdb/repl/drepl_out_pull.c index ceec61848d..8a33006d06 100644 --- a/source4/dsdb/repl/drepl_out_pull.c +++ b/source4/dsdb/repl/drepl_out_pull.c @@ -35,7 +35,9 @@ WERROR dreplsrv_schedule_partition_pull_source(struct dreplsrv_service *s, struct dreplsrv_partition_source_dsa *source, - enum drsuapi_DsExtendedOperation extended_op) + enum drsuapi_DsExtendedOperation extended_op, + uint64_t fsmo_info, + dreplsrv_fsmo_callback_t callback) { struct dreplsrv_out_operation *op; @@ -45,6 +47,8 @@ WERROR dreplsrv_schedule_partition_pull_source(struct dreplsrv_service *s, op->service = s; op->source_dsa = source; op->extended_op = extended_op; + op->fsmo_info = fsmo_info; + op->callback = callback; DLIST_ADD_END(s->ops.pending, op, struct dreplsrv_out_operation *); @@ -59,7 +63,7 @@ static WERROR dreplsrv_schedule_partition_pull(struct dreplsrv_service *s, struct dreplsrv_partition_source_dsa *cur; for (cur = p->sources; cur; cur = cur->next) { - status = dreplsrv_schedule_partition_pull_source(s, cur, DRSUAPI_EXOP_NONE); + status = dreplsrv_schedule_partition_pull_source(s, cur, DRSUAPI_EXOP_NONE, 0, NULL); W_ERROR_NOT_OK_RETURN(status); } @@ -122,6 +126,9 @@ static void dreplsrv_pending_op_callback(struct dreplsrv_out_operation *op) rf->consecutive_sync_failures)); done: + if (op->callback) { + op->callback(s, rf->result_last_attempt); + } talloc_free(op); s->ops.current = NULL; dreplsrv_run_pending_ops(s); |