1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3: Remove smbd_server_conn from process_oplock_break_message

This commit is contained in:
Volker Lendecke 2010-10-03 17:22:09 +02:00
parent 35d6d44e5a
commit 5d1d575e87

View File

@ -479,7 +479,7 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
struct server_id src,
DATA_BLOB *data)
{
struct smbd_server_connection *sconn = smbd_server_conn;
struct smbd_server_connection *sconn;
struct share_mode_entry msg;
files_struct *fsp;
bool break_to_level2 = False;
@ -489,6 +489,12 @@ static void process_oplock_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;
@ -501,8 +507,7 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
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