summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-27 09:46:30 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-01 16:11:56 +0100
commit0547af244a46e5647eb7dfc9b4a92924d15ab15d (patch)
tree89fcdc517477f7f4800a871210efac4263e5901c /source4
parent1955cde46c33409da85617dfe058a9a965e4b4f7 (diff)
downloadsamba-0547af244a46e5647eb7dfc9b4a92924d15ab15d.tar.gz
samba-0547af244a46e5647eb7dfc9b4a92924d15ab15d.tar.bz2
samba-0547af244a46e5647eb7dfc9b4a92924d15ab15d.zip
s4:drepl_out_helpers: don't look at the internals of 'struct rpc_request'
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/repl/drepl_out_helpers.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c
index f80f707322..3436b452c6 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -203,6 +203,7 @@ NTSTATUS dreplsrv_out_drsuapi_recv(struct tevent_req *req)
struct dreplsrv_op_pull_source_state {
struct dreplsrv_out_operation *op;
+ void *ndr_struct_ptr;
};
static void dreplsrv_op_pull_source_connect_done(struct tevent_req *subreq);
@@ -322,6 +323,7 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges, r);
#endif
+ state->ndr_struct_ptr = r;
rreq = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi->pipe, r, r);
if (tevent_req_nomem(rreq, req)) {
return;
@@ -339,13 +341,17 @@ static void dreplsrv_op_pull_source_get_changes_done(struct rpc_request *rreq)
{
struct tevent_req *req = talloc_get_type(rreq->async.private_data,
struct tevent_req);
+ struct dreplsrv_op_pull_source_state *state = tevent_req_data(req,
+ struct dreplsrv_op_pull_source_state);
NTSTATUS status;
- struct drsuapi_DsGetNCChanges *r = talloc_get_type(rreq->ndr.struct_ptr,
+ struct drsuapi_DsGetNCChanges *r = talloc_get_type(state->ndr_struct_ptr,
struct drsuapi_DsGetNCChanges);
uint32_t ctr_level = 0;
struct drsuapi_DsGetNCChangesCtr1 *ctr1 = NULL;
struct drsuapi_DsGetNCChangesCtr6 *ctr6 = NULL;
+ state->ndr_struct_ptr = NULL;
+
status = dcerpc_drsuapi_DsGetNCChanges_recv(rreq);
if (tevent_req_nterror(req, status)) {
return;
@@ -552,6 +558,7 @@ static void dreplsrv_update_refs_trigger(struct tevent_req *req)
r->in.req.req1.options |= DRSUAPI_DRS_WRIT_REP;
}
+ state->ndr_struct_ptr = r;
rreq = dcerpc_drsuapi_DsReplicaUpdateRefs_send(drsuapi->pipe, r, r);
if (tevent_req_nomem(rreq, req)) {
return;
@@ -566,10 +573,14 @@ static void dreplsrv_update_refs_done(struct rpc_request *rreq)
{
struct tevent_req *req = talloc_get_type(rreq->async.private_data,
struct tevent_req);
- struct drsuapi_DsReplicaUpdateRefs *r = talloc_get_type(rreq->ndr.struct_ptr,
+ struct dreplsrv_op_pull_source_state *state = tevent_req_data(req,
+ struct dreplsrv_op_pull_source_state);
+ struct drsuapi_DsReplicaUpdateRefs *r = talloc_get_type(state->ndr_struct_ptr,
struct drsuapi_DsReplicaUpdateRefs);
NTSTATUS status;
+ state->ndr_struct_ptr = NULL;
+
status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(rreq);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("UpdateRefs failed with %s\n",