diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-12-12 15:45:07 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-12-12 20:14:41 +0100 |
commit | f59d3586535252e7d3c1944bc827807be60692a6 (patch) | |
tree | 425033b57094debff087204adbe61ac966913a35 | |
parent | 162975a6f3369566dd36c28b5b6328f07b5aa605 (diff) | |
download | samba-f59d3586535252e7d3c1944bc827807be60692a6.tar.gz samba-f59d3586535252e7d3c1944bc827807be60692a6.tar.bz2 samba-f59d3586535252e7d3c1944bc827807be60692a6.zip |
s3:smb2_lock: pass smbd_server_connection as private_data to received_unlock_msg()
metze
-rw-r--r-- | source3/smbd/smb2_lock.c | 13 |
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; } |