mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r17340: initialize elements od dcesrc_call_state in one central place
and pass the messaging context to the call metze (This used to be commit 0d7f16d7befa1e8824173d7b9da580e6a92ae4e5)
This commit is contained in:
parent
9b6f35edbf
commit
63aaa6b782
@ -745,10 +745,6 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
|
||||
NTSTATUS status;
|
||||
struct dcesrv_connection_context *context;
|
||||
|
||||
call->fault_code = 0;
|
||||
call->state_flags = call->conn->state_flags;
|
||||
call->time = timeval_current();
|
||||
|
||||
/* if authenticated, and the mech we use can't do async replies, don't use them... */
|
||||
if (call->conn->auth_state.gensec_security &&
|
||||
!gensec_have_feature(call->conn->auth_state.gensec_security, GENSEC_FEATURE_ASYNC_REPLIES)) {
|
||||
@ -766,7 +762,6 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
|
||||
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
||||
|
||||
call->context = context;
|
||||
call->event_ctx = context->conn->event_ctx;
|
||||
call->ndr_pull = pull;
|
||||
|
||||
if (call->pkt.pfc_flags & DCERPC_PFC_FLAG_ORPC) {
|
||||
@ -963,15 +958,16 @@ NTSTATUS dcesrv_input_process(struct dcesrv_connection *dce_conn)
|
||||
struct dcesrv_call_state *call;
|
||||
DATA_BLOB blob;
|
||||
|
||||
call = talloc(dce_conn, struct dcesrv_call_state);
|
||||
call = talloc_zero(dce_conn, struct dcesrv_call_state);
|
||||
if (!call) {
|
||||
talloc_free(dce_conn->partial_input.data);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
call->conn = dce_conn;
|
||||
call->replies = NULL;
|
||||
call->context = NULL;
|
||||
call->event_ctx = dce_conn->event_ctx;
|
||||
call->conn = dce_conn;
|
||||
call->event_ctx = dce_conn->event_ctx;
|
||||
call->msg_ctx = dce_conn->msg_ctx;
|
||||
call->state_flags = call->conn->state_flags;
|
||||
call->time = timeval_current();
|
||||
|
||||
blob = dce_conn->partial_input;
|
||||
blob.length = dcerpc_get_frag_length(&blob);
|
||||
|
@ -99,10 +99,17 @@ struct dcesrv_call_state {
|
||||
/* the backend can use this event context for async replies */
|
||||
struct event_context *event_ctx;
|
||||
|
||||
/* the message_context that will be used for async replies */
|
||||
struct messaging_context *msg_ctx;
|
||||
|
||||
/* this is the pointer to the allocated function struct */
|
||||
void *r;
|
||||
|
||||
/* that's the ndr push context used in dcesrv_request */
|
||||
/*
|
||||
* that's the ndr pull context used in dcesrv_request()
|
||||
* needed by dcesrv_reply() to carry over information
|
||||
* for full pointer support.
|
||||
*/
|
||||
struct ndr_pull *ndr_pull;
|
||||
|
||||
DATA_BLOB input;
|
||||
|
Loading…
x
Reference in New Issue
Block a user