diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-12-13 13:18:47 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-12-13 20:31:09 +0100 |
commit | 7fee41cd39afff925ce9af7793736e2444572b58 (patch) | |
tree | 9cbd032953983e3180a5db012ee06f53c313459f | |
parent | fb81772eed3c653dcd567dcb2e97894bd3c6f84a (diff) | |
download | samba-7fee41cd39afff925ce9af7793736e2444572b58.tar.gz samba-7fee41cd39afff925ce9af7793736e2444572b58.tar.bz2 samba-7fee41cd39afff925ce9af7793736e2444572b58.zip |
s3:smbd/oplock: pass sconn as private_data to process_oplock_break_response()
metze
-rw-r--r-- | source3/smbd/oplock.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 5806d69614..b23df3fdfa 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -691,7 +691,13 @@ static void process_oplock_break_response(struct messaging_context *msg_ctx, DATA_BLOB *data) { struct share_mode_entry msg; - struct smbd_server_connection *sconn; + struct smbd_server_connection *sconn = + talloc_get_type(private_data, + struct smbd_server_connection); + + if (sconn == NULL) { + return; + } if (data->data == NULL) { DEBUG(0, ("Got NULL buffer\n")); @@ -713,10 +719,7 @@ static void process_oplock_break_response(struct messaging_context *msg_ctx, (unsigned long long)msg.share_file_id, (unsigned long long)msg.op_mid)); - sconn = msg_ctx_to_sconn(msg_ctx); - if (sconn != NULL) { - schedule_deferred_open_message_smb(sconn, msg.op_mid); - } + schedule_deferred_open_message_smb(sconn, msg.op_mid); } static void process_open_retry_message(struct messaging_context *msg_ctx, @@ -938,7 +941,7 @@ bool init_oplocks(struct smbd_server_connection *sconn) process_oplock_break_message); messaging_register(sconn->msg_ctx, sconn, MSG_SMB_ASYNC_LEVEL2_BREAK, process_oplock_async_level2_break_message); - messaging_register(sconn->msg_ctx, NULL, MSG_SMB_BREAK_RESPONSE, + messaging_register(sconn->msg_ctx, sconn, MSG_SMB_BREAK_RESPONSE, process_oplock_break_response); messaging_register(sconn->msg_ctx, NULL, MSG_SMB_KERNEL_BREAK, process_kernel_oplock_break); |