svn commit: samba r17340 - in branches/SAMBA_4_0/source/rpc_server: .

metze at samba.org metze at samba.org
Mon Jul 31 13:40:49 GMT 2006


Author: metze
Date: 2006-07-31 13:40:49 +0000 (Mon, 31 Jul 2006)
New Revision: 17340

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17340

Log:
initialize elements od dcesrc_call_state in one central place
and pass the messaging context to the call

metze
Modified:
   branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
   branches/SAMBA_4_0/source/rpc_server/dcerpc_server.h


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c	2006-07-31 13:34:00 UTC (rev 17339)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c	2006-07-31 13:40:49 UTC (rev 17340)
@@ -745,10 +745,6 @@
 	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 @@
 	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 @@
 	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);

Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.h
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.h	2006-07-31 13:34:00 UTC (rev 17339)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.h	2006-07-31 13:40:49 UTC (rev 17340)
@@ -99,10 +99,17 @@
 	/* 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;



More information about the samba-cvs mailing list