From 6e28bf174b4670b47a3a4d402b935da3c7cbf421 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 16 Sep 2014 09:23:54 +0200 Subject: s3:smb2_break: use fsp->conn->sconn->client->connections to send SMB2 oplock breaks This means we use the first connection for now. TODO: we may need to use the connection on which the SMB2 create was done and fallback to other connections. Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- source3/smbd/smb2_break.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c index c711fe6c5b..ec20f8bd6c 100644 --- a/source3/smbd/smb2_break.c +++ b/source3/smbd/smb2_break.c @@ -233,11 +233,18 @@ void send_break_message_smb2(files_struct *fsp, int level) SMB2_OPLOCK_LEVEL_II : SMB2_OPLOCK_LEVEL_NONE; NTSTATUS status; - struct smbXsrv_connection *xconn = fsp->conn->sconn->conn; + struct smbXsrv_connection *xconn = NULL; struct smbXsrv_session *session = NULL; struct timeval tv = timeval_current(); NTTIME now = timeval_to_nttime(&tv); + /* + * TODO: in future we should have a better algorithm + * to find the correct connection for an break message. + * Then we also need some retries if a channel gets disconnected. + */ + xconn = fsp->conn->sconn->client->connections; + status = smb2srv_session_lookup(xconn, fsp->vuid, now, -- cgit