diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-07-31 13:40:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:16 -0500 |
commit | 63aaa6b782bf6b8b2badabd41579fff2a235d526 (patch) | |
tree | a69825fef9909028a039d3662d39979c804c8ac5 /source4/rpc_server | |
parent | 9b6f35edbf439fec4a0d32104ee8475bf1e313c9 (diff) | |
download | samba-63aaa6b782bf6b8b2badabd41579fff2a235d526.tar.gz samba-63aaa6b782bf6b8b2badabd41579fff2a235d526.tar.bz2 samba-63aaa6b782bf6b8b2badabd41579fff2a235d526.zip |
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)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 16 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_server.h | 9 |
2 files changed, 14 insertions, 11 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index fcc1989cec..e7a77d0875 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -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); diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h index 57d8bb2d79..031ace49d7 100644 --- a/source4/rpc_server/dcerpc_server.h +++ b/source4/rpc_server/dcerpc_server.h @@ -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; |