s3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2
[kai/samba.git] / source3 / smbd / service.c
index 1bcbbcda6a38c549f0da4ff6f868f36cb5eb87dc..fe5838225d9f690529ac6b61a6ad3c09df39c096 100644 (file)
@@ -941,7 +941,8 @@ static connection_struct *make_connection_smb1(struct smbd_server_connection *sc
 ****************************************************************************/
 
 connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
-                                       struct smbd_smb2_tcon *tcon,
+                                       struct smbXsrv_tcon *tcon,
+                                       int snum,
                                        struct user_struct *vuser,
                                        const char *pdev,
                                        NTSTATUS *pstatus)
@@ -952,10 +953,13 @@ connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
                *pstatus = NT_STATUS_INSUFFICIENT_RESOURCES;
                return NULL;
        }
-       conn->cnum = tcon->tid;
+
+       conn->cnum = tcon->global->tcon_wire_id;
+       conn->tcon = tcon;
+
        *pstatus = make_connection_snum(sconn,
                                        conn,
-                                       tcon->snum,
+                                       snum,
                                        vuser,
                                        pdev);
        if (!NT_STATUS_IS_OK(*pstatus)) {