From 9557ac4b465b3ea25eeefc2e0515c173d55acc89 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 23 May 2014 08:45:01 +0200 Subject: [PATCH] s3:smbd: move sconn->smb1.fde to xconn->transport.fde This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Reviewed-by: Michael Adam --- source3/smbd/globals.h | 3 +-- source3/smbd/process.c | 18 +++++++++--------- source3/smbd/smb2_server.c | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 82b09f08ec2..a928123f317 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -345,6 +345,7 @@ struct smbXsrv_connection { struct { int sock; + struct tevent_fd *fde; struct { bool got_session; @@ -700,8 +701,6 @@ struct smbd_server_connection { } oplocks; struct { - struct tevent_fd *fde; - struct { /* diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 41547bbe159..b720f9b934a 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2518,8 +2518,8 @@ static void smbd_server_connection_handler(struct tevent_context *ev, /* * we're not supposed to do any io */ - TEVENT_FD_NOT_READABLE(conn->smb1.fde); - TEVENT_FD_NOT_WRITEABLE(conn->smb1.fde); + TEVENT_FD_NOT_READABLE(xconn->transport.fde); + TEVENT_FD_NOT_WRITEABLE(xconn->transport.fde); return; } @@ -3834,13 +3834,13 @@ void smbd_process(struct tevent_context *ev_ctx, exit_server("init_dptrs() failed"); } - sconn->smb1.fde = tevent_add_fd(ev_ctx, - sconn, - sock_fd, - TEVENT_FD_READ, - smbd_server_connection_handler, - sconn); - if (!sconn->smb1.fde) { + conn->transport.fde = tevent_add_fd(ev_ctx, + sconn, + sock_fd, + TEVENT_FD_READ, + smbd_server_connection_handler, + sconn); + if (!conn->transport.fde) { exit_server("failed to create smbd_server_connection fde"); } diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 59af7386413..20fc92b04f0 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -202,7 +202,7 @@ static NTSTATUS smbd_initialize_smb2(struct smbd_server_connection *sconn) { struct smbXsrv_connection *xconn = sconn->conn; - TALLOC_FREE(sconn->smb1.fde); + TALLOC_FREE(xconn->transport.fde); sconn->smb2.send_queue = NULL; -- 2.11.4.GIT