diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-09-16 09:23:54 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-09-19 09:15:12 +0200 |
commit | 6e28bf174b4670b47a3a4d402b935da3c7cbf421 (patch) | |
tree | ea0f3b1449be7db32a0cb2bd114357beefe85db0 | |
parent | 33bffc3258ecc4f318a9915d3613ef11fb4ce886 (diff) | |
download | samba-6e28bf174b4670b47a3a4d402b935da3c7cbf421.tar.gz samba-6e28bf174b4670b47a3a4d402b935da3c7cbf421.tar.xz samba-6e28bf174b4670b47a3a4d402b935da3c7cbf421.zip |
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 <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | source3/smbd/smb2_break.c | 9 |
1 files changed, 8 insertions, 1 deletions
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, |