summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/smb2_lock.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c
index 8f4df3d25a..57bcbe6806 100644
--- a/source3/smbd/smb2_lock.c
+++ b/source3/smbd/smb2_lock.c
@@ -450,15 +450,16 @@ static void received_unlock_msg(struct messaging_context *msg,
struct server_id server_id,
DATA_BLOB *data)
{
- struct smbd_server_connection *sconn;
+ struct smbd_server_connection *sconn =
+ talloc_get_type(private_data,
+ struct smbd_server_connection);
- DEBUG(10,("received_unlock_msg (SMB2)\n"));
-
- sconn = msg_ctx_to_sconn(msg);
if (sconn == NULL) {
- DEBUG(1, ("could not find sconn\n"));
return;
}
+
+ DEBUG(10,("received_unlock_msg (SMB2)\n"));
+
process_blocking_lock_queue_smb2(sconn, timeval_current());
}
@@ -665,7 +666,7 @@ bool push_blocking_lock_request_smb2( struct byte_range_lock *br_lck,
/* Ensure we'll receive messages when this is unlocked. */
if (!sconn->smb2.locks.blocking_lock_unlock_state) {
- messaging_register(sconn->msg_ctx, NULL,
+ messaging_register(sconn->msg_ctx, sconn,
MSG_SMB_UNLOCK, received_unlock_msg);
sconn->smb2.locks.blocking_lock_unlock_state = true;
}