summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/oplock.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 2be9849607..3f809b0812 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -429,6 +429,7 @@ void process_oplock_async_level2_break_message(struct messaging_context *msg_ctx
struct server_id src,
DATA_BLOB *data)
{
+ struct smbd_server_connection *sconn;
struct share_mode_entry msg;
files_struct *fsp;
@@ -437,6 +438,12 @@ void process_oplock_async_level2_break_message(struct messaging_context *msg_ctx
return;
}
+ sconn = msg_ctx_to_sconn(msg_ctx);
+ if (sconn == NULL) {
+ DEBUG(1, ("could not find sconn\n"));
+ return;
+ }
+
if (data->length != MSG_SMB_SHARE_MODE_ENTRY_SIZE) {
DEBUG(0, ("Got invalid msg len %d\n", (int)data->length));
return;
@@ -449,8 +456,7 @@ void process_oplock_async_level2_break_message(struct messaging_context *msg_ctx
"%s/%lu\n", procid_str(talloc_tos(), &src),
file_id_string_tos(&msg.id), msg.share_file_id));
- fsp = initial_break_processing(smbd_server_conn, msg.id,
- msg.share_file_id);
+ fsp = initial_break_processing(sconn, msg.id, msg.share_file_id);
if (fsp == NULL) {
/* We hit a race here. Break messages are sent, and before we