wip
authorGünther Deschner <gd@samba.org>
Sat, 3 Feb 2018 14:23:20 +0000 (15:23 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 18 Sep 2018 10:34:35 +0000 (12:34 +0200)
source3/smbd/smb2_break.c
source3/smbd/smb2_server.c

index 3f0862a694e016b7b94937aae08d97c8de3cf70b..1182f3d866fe4b79de7af8f752200ddb5a98a05a 100644 (file)
@@ -444,6 +444,7 @@ void send_break_message_smb2(files_struct *fsp,
 {
        NTSTATUS status;
        struct smbXsrv_client *client = NULL;
+       struct smbXsrv_connection *xconn = NULL;
        struct smbXsrv_session *session = NULL;
        struct timeval tv = timeval_current();
        NTTIME now = timeval_to_nttime(&tv);
@@ -453,9 +454,12 @@ 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.
         */
+
+       /* try to pick the last client */
        client = fsp->conn->sconn->client;
+       xconn = smb_get_latest_client_connection(client);
 
-       status = smb2srv_session_lookup_conn(client->connections,
+       status = smb2srv_session_lookup_conn(xconn,
                                             fsp->vuid,
                                             now,
                                             &session);
index b05254aea2cd8f94c9ef29f34ab1e1d7771c62db..419c74ff2b813542b6e6a68aa02a1252b5c6d87c 100644 (file)
@@ -3390,8 +3390,7 @@ static NTSTATUS smbd_smb2_send_break(struct smbXsrv_client *client,
                }
        }
 
-       // TODO: which channel should be used???
-       xconn = client->connections;
+       xconn = smb_get_latest_client_connection(client);
 
        state->queue_entry.mem_ctx = state;
        state->queue_entry.vector = state->vector;