+NTSTATUS dcerpc_binding_handle_call_params_recv(struct tevent_req *req)
+{
+ return tevent_req_simple_recv_ntstatus(req);
+}
+
+struct dcerpc_binding_handle_call_state {
+ struct dcerpc_binding_handle_call_params params;
+};
+
+static void dcerpc_binding_handle_call_done(struct tevent_req *subreq);
+
+struct tevent_req *dcerpc_binding_handle_call_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ const struct GUID *object,
+ const struct ndr_interface_table *table,
+ uint32_t opnum,
+ TALLOC_CTX *r_mem,
+ void *r_ptr)
+{
+ struct tevent_req *req;
+ struct dcerpc_binding_handle_call_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_binding_handle_call_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ state->params.r_mem = r_mem;
+ state->params.r_ptr = r_ptr;
+
+ subreq = dcerpc_binding_handle_call_params_send(state, ev, h,
+ object, table, opnum,
+ &state->params);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, dcerpc_binding_handle_call_done, req);
+
+ return req;
+}
+
+static void dcerpc_binding_handle_call_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(subreq,
+ struct tevent_req);
+ NTSTATUS error;
+
+ error = dcerpc_binding_handle_call_params_recv(subreq);
+ TALLOC_FREE(subreq);
+ if (tevent_req_nterror(req, error)) {
+ return;
+ }
+
+ tevent_req_done(req);
+}
+