]> git.samba.org - obnox/samba/samba-obnox.git/commitdiff
pass down smbXsrv_client
authorGünther Deschner <gd@samba.org>
Tue, 6 Sep 2016 16:09:15 +0000 (18:09 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 19 Sep 2016 20:20:49 +0000 (22:20 +0200)
source3/smbd/globals.h
source3/smbd/oplock.c
source3/smbd/smb2_break.c
source3/smbd/smb2_server.c

index 98a4ed7ca616c42ab593ff75a60b7e480da0066a..7183133d27b8db8521fc9deeffb790fce7c6f507 100644 (file)
@@ -249,12 +249,12 @@ NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,
 #define smbd_smb2_request_done(req, body, dyn) \
        smbd_smb2_request_done_ex(req, NT_STATUS_OK, body, dyn, __location__)
 
-NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_client *client,
                                     struct smbXsrv_session *session,
                                     struct smbXsrv_tcon *tcon,
                                     struct smbXsrv_open *op,
                                     uint8_t oplock_level);
-NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_client *client,
                                    uint16_t new_epoch,
                                    uint32_t lease_flags,
                                    struct smb2_lease_key *lease_key,
index ff87d9ea4498327be2cfc921a8bda596b0cfeed3..4010d8ebb6af711fe52a752d366722be6321f81a 100644 (file)
@@ -455,7 +455,7 @@ static void downgrade_lease_additional_trigger(struct tevent_context *ev,
        struct smbXsrv_connection *xconn = state->xconn;
        NTSTATUS status;
 
-       status = smbd_smb2_send_lease_break(xconn,
+       status = smbd_smb2_send_lease_break(NULL, //xconn,
                                            state->new_epoch,
                                            state->break_flags,
                                            &state->lease_key,
index 4c5d62e73d68bacc599f029928781db8168408ea..68f12386a3cc55d8165da3d5f8ed7aaab4929839 100644 (file)
@@ -438,7 +438,7 @@ void send_break_message_smb2(files_struct *fsp,
                             uint32_t break_to)
 {
        NTSTATUS status;
-       struct smbXsrv_connection *xconn = NULL;
+       struct smbXsrv_client *client = NULL;
        struct smbXsrv_session *session = NULL;
        struct timeval tv = timeval_current();
        NTTIME now = timeval_to_nttime(&tv);
@@ -448,9 +448,9 @@ void send_break_message_smb2(files_struct *fsp,
         * to find the correct connection for a break message.
         * Then we also need some retries if a channel gets disconnected.
         */
-       xconn = fsp->conn->sconn->client->connections;
+       client = fsp->conn->sconn->client;
 
-       status = smb2srv_session_lookup_conn(xconn,
+       status = smb2srv_session_lookup_conn(client->connections,
                                             fsp->vuid,
                                             now,
                                             &session);
@@ -487,21 +487,21 @@ void send_break_message_smb2(files_struct *fsp,
                        new_epoch = 0;
                }
 
-               status = smbd_smb2_send_lease_break(xconn, new_epoch, break_flags,
+               status = smbd_smb2_send_lease_break(client, new_epoch, break_flags,
                                                    &fsp->lease->lease.lease_key,
                                                    break_from, break_to);
        } else {
                uint8_t smb2_oplock_level;
                smb2_oplock_level = (break_to & SMB2_LEASE_READ) ?
                        SMB2_OPLOCK_LEVEL_II : SMB2_OPLOCK_LEVEL_NONE;
-               status = smbd_smb2_send_oplock_break(xconn,
+               status = smbd_smb2_send_oplock_break(client,
                                                     session,
                                                     fsp->conn->tcon,
                                                     fsp->op,
                                                     smb2_oplock_level);
        }
        if (!NT_STATUS_IS_OK(status)) {
-               smbd_server_connection_terminate(xconn,
+               smbd_server_connection_terminate(client->connections,
                                                 nt_errstr(status));
                return;
        }
index a9b0eff6dddeab2c084ce303477f7eee586a1c5d..b88dc921ebb7b0ea321f2ceaba7e49160fd93b94 100644 (file)
@@ -3329,7 +3329,7 @@ static void smbd_smb2_send_break_done(struct tevent_req *ack_req)
        TALLOC_FREE(state);
 }
 
-NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_client *client,
                                     struct smbXsrv_session *session,
                                     struct smbXsrv_tcon *tcon,
                                     struct smbXsrv_open *op,
@@ -3344,10 +3344,10 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn,
        SBVAL(body, 0x08, op->global->open_persistent_id);
        SBVAL(body, 0x10, op->global->open_volatile_id);
 
-       return smbd_smb2_send_break(xconn, NULL, NULL, body, sizeof(body));
+       return smbd_smb2_send_break(client, NULL, NULL, body, sizeof(body));
 }
 
-NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_client *client,
                                    uint16_t new_epoch,
                                    uint32_t lease_flags,
                                    struct smb2_lease_key *lease_key,
@@ -3367,7 +3367,7 @@ NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn,
        SIVAL(body, 0x24, 0);           /* AccessMaskHint, MUST be 0 */
        SIVAL(body, 0x28, 0);           /* ShareMaskHint, MUST be 0 */
 
-       return smbd_smb2_send_break(xconn, NULL, NULL, body, sizeof(body));
+       return smbd_smb2_send_break(client, NULL, NULL, body, sizeof(body));
 }
 
 static bool is_smb2_recvfile_write(struct smbd_smb2_request_read_state *state)