s3:smbd: move sconn->smb1.fde to xconn->transport.fde
authorStefan Metzmacher <metze@samba.org>
Fri, 23 May 2014 06:45:01 +0000 (08:45 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 6 Aug 2014 07:51:11 +0000 (09:51 +0200)
This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/globals.h
source3/smbd/process.c
source3/smbd/smb2_server.c

index 82b09f08ec23e6a4b3eb5f7aa86139c653061886..a928123f31731202ba224470351cc1aae3c15ae8 100644 (file)
@@ -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 {
 
                        /*
index 41547bbe15957110a4b347c5118a516975bf0c4c..b720f9b934ab36d4f1e9e86371e89e2e0793c08d 100644 (file)
@@ -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");
        }
 
index 59af7386413bba2332962de912f9b2cab42ea473..20fc92b04f088b79d67340fdd2d3fa65e37d9b9a 100644 (file)
@@ -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;