summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl/drepl_out_pull.c
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-08-31 00:01:25 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-09-03 13:23:47 +0300
commit5685fb64e4f4660d586e57c59800d0f374d10749 (patch)
treedb54debf0aace8911916e8d81e48308b671180bb /source4/dsdb/repl/drepl_out_pull.c
parentcf728f890f6d2cd8cc831ba95a5d2d0dac6e8e35 (diff)
downloadsamba-5685fb64e4f4660d586e57c59800d0f374d10749.tar.gz
samba-5685fb64e4f4660d586e57c59800d0f374d10749.tar.bz2
samba-5685fb64e4f4660d586e57c59800d0f374d10749.zip
s4-dreplsrv: Add caller-specific data parameter for dreplsrv_fsmo_callback_t
It is to be used when we need to preserve a state to be used in tha callback when dreplsrv_out_operation is completed
Diffstat (limited to 'source4/dsdb/repl/drepl_out_pull.c')
-rw-r--r--source4/dsdb/repl/drepl_out_pull.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/dsdb/repl/drepl_out_pull.c b/source4/dsdb/repl/drepl_out_pull.c
index e9b57a1fec..db77a4e1de 100644
--- a/source4/dsdb/repl/drepl_out_pull.c
+++ b/source4/dsdb/repl/drepl_out_pull.c
@@ -38,7 +38,8 @@ WERROR dreplsrv_schedule_partition_pull_source(struct dreplsrv_service *s,
struct dreplsrv_partition_source_dsa *source,
enum drsuapi_DsExtendedOperation extended_op,
uint64_t fsmo_info,
- dreplsrv_fsmo_callback_t callback)
+ dreplsrv_fsmo_callback_t callback,
+ void *cb_data)
{
struct dreplsrv_out_operation *op;
@@ -50,6 +51,7 @@ WERROR dreplsrv_schedule_partition_pull_source(struct dreplsrv_service *s,
op->extended_op = extended_op;
op->fsmo_info = fsmo_info;
op->callback = callback;
+ op->cb_data = cb_data;
DLIST_ADD_END(s->ops.pending, op, struct dreplsrv_out_operation *);
@@ -64,7 +66,9 @@ 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, 0, NULL);
+ status = dreplsrv_schedule_partition_pull_source(s, cur,
+ DRSUAPI_EXOP_NONE, 0,
+ NULL, NULL);
W_ERROR_NOT_OK_RETURN(status);
}
@@ -160,7 +164,7 @@ static void dreplsrv_pending_op_callback(struct tevent_req *subreq)
done:
if (op->callback) {
- op->callback(s, rf->result_last_attempt, op->extended_ret);
+ op->callback(s, rf->result_last_attempt, op->extended_ret, op->cb_data);
}
talloc_free(op);
s->ops.current = NULL;