The branch, v4-0-test has been updated via 76dd521bcf53a245bd1412968e9b921e5c2f10c9 (commit) via 5d5b4e4ab23e1c630dfde2b9f296681e3979c4e0 (commit) from 9a5f7bf68b20e3b490b209b5cfc4408566320f2e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log ----------------------------------------------------------------- commit 76dd521bcf53a245bd1412968e9b921e5c2f10c9 Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Sat May 17 02:40:37 2008 +0200 rpc_server: use the transport session_info if available metze commit 5d5b4e4ab23e1c630dfde2b9f296681e3979c4e0 Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Mon Jul 7 18:55:59 2008 +0200 packet: make it possible to free the packet_context from the send_callback metze (cherry picked from commit 20795c4a0d5f75561561470231de1a2fad2906ff) ----------------------------------------------------------------------- Summary of changes: source/lib/stream/packet.c | 6 ++++++ source/rpc_server/service_rpc.c | 20 ++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/stream/packet.c b/source/lib/stream/packet.c index 51021c1..92fa0e5 100644 --- a/source/lib/stream/packet.c +++ b/source/lib/stream/packet.c @@ -469,7 +469,13 @@ _PUBLIC_ void packet_queue_run(struct packet_context *pc) if (el->nsent == el->blob.length) { DLIST_REMOVE(pc->send_queue, el); if (el->send_callback) { + pc->busy = true; el->send_callback(el->send_callback_private); + pc->busy = false; + if (pc->destructor_called) { + talloc_free(pc); + return; + } } talloc_free(el); } diff --git a/source/rpc_server/service_rpc.c b/source/rpc_server/service_rpc.c index 00f0d26..b68cec4 100644 --- a/source/rpc_server/service_rpc.c +++ b/source/rpc_server/service_rpc.c @@ -104,20 +104,24 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn) struct dcesrv_socket_context *dcesrv_sock = talloc_get_type(srv_conn->private, struct dcesrv_socket_context); struct dcesrv_connection *dcesrv_conn = NULL; - struct auth_session_info *session_info = NULL; - status = auth_anonymous_session_info(srv_conn, srv_conn->event.ctx, dcesrv_sock->dcesrv_ctx->lp_ctx, &session_info); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0,("dcesrv_sock_accept: auth_anonymous_session_info failed: %s\n", - nt_errstr(status))); - stream_terminate_connection(srv_conn, nt_errstr(status)); - return; + if (!srv_conn->session_info) { + status = auth_anonymous_session_info(srv_conn, + srv_conn->event.ctx, + srv_conn->lp_ctx, + &srv_conn->session_info); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0,("dcesrv_sock_accept: auth_anonymous_session_info failed: %s\n", + nt_errstr(status))); + stream_terminate_connection(srv_conn, nt_errstr(status)); + return; + } } status = dcesrv_endpoint_connect(dcesrv_sock->dcesrv_ctx, srv_conn, dcesrv_sock->endpoint, - session_info, + srv_conn->session_info, srv_conn->event.ctx, srv_conn->msg_ctx, srv_conn->server_id, -- Samba Shared Repository