s3:smbd: move sconn->nbt.* to xconn->transport.nbt.*
authorStefan Metzmacher <metze@samba.org>
Tue, 20 May 2014 17:59:12 +0000 (19:59 +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/reply.c

index 3b9882d211782c465dd77db1eac4f42c66bfb1cf..8f4a0214ec8069306d854d3d19e7213ec54d7f38 100644 (file)
@@ -343,6 +343,12 @@ struct smbXsrv_connection {
 
        enum protocol_types protocol;
 
+       struct {
+               struct {
+                       bool got_session;
+               } nbt;
+       } transport;
+
        struct {
                struct {
                        uint32_t capabilities;
@@ -658,9 +664,6 @@ struct smbd_server_connection {
        struct messaging_context *msg_ctx;
        struct sys_notify_context *sys_notify_ctx;
        struct notify_context *notify_ctx;
-       struct {
-               bool got_session;
-       } nbt;
        bool using_smb2;
        int trans_num;
 
index 1b80ba585c63361bcb314bcf02cd4fe4324f9266..0e468a24832d6c4e249d3edfbac445faa7ad5798 100644 (file)
@@ -3814,8 +3814,6 @@ void smbd_process(struct tevent_context *ev_ctx,
                }
        }
 
-       sconn->nbt.got_session = false;
-
        tmp = lp_max_xmit();
        tmp = MAX(tmp, SMB_BUFFER_SIZE_MIN);
        tmp = MIN(tmp, SMB_BUFFER_SIZE_MAX);
index 32ba98fa8d9e3ba89fe20634b47018483ca6d75d..28c0426e7bb27ad6457ffaa4db4b82ff6712d1ad 100644 (file)
@@ -533,6 +533,7 @@ static void reply_called_name_not_present(char *outbuf)
 
 void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inbuf_size)
 {
+       struct smbXsrv_connection *xconn = sconn->conn;
        int msg_type = CVAL(inbuf,0);
        int msg_flags = CVAL(inbuf,1);
        /*
@@ -556,7 +557,7 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inb
 
                *name1 = *name2 = 0;
 
-               if (sconn->nbt.got_session) {
+               if (xconn->transport.nbt.got_session) {
                        exit_server_cleanly("multiple session request not permitted");
                }
 
@@ -642,7 +643,7 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inb
                reload_services(sconn, conn_snum_used, true);
                reopen_logs();
 
-               sconn->nbt.got_session = true;
+               xconn->transport.nbt.got_session = true;
                break;
        }