From f59d3586535252e7d3c1944bc827807be60692a6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 12 Dec 2011 15:45:07 +0100 Subject: [PATCH] s3:smb2_lock: pass smbd_server_connection as private_data to received_unlock_msg() metze --- source3/smbd/smb2_lock.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c index 8f4df3d25ab..57bcbe6806e 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; } -- 2.34.1