summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-10-03 17:22:09 +0200
committerVolker Lendecke <vl@samba.org>2010-10-03 18:17:08 +0200
commit5d1d575e87dfd8a378f385ce1d99c66956cbb17b (patch)
treed0b696e4690e25870794fa56d252c9a251fcee14 /source3
parent35d6d44e5ae6e82c8c1eb05d4bff65b5399f1197 (diff)
downloadsamba-5d1d575e87dfd8a378f385ce1d99c66956cbb17b.tar.gz
samba-5d1d575e87dfd8a378f385ce1d99c66956cbb17b.tar.bz2
samba-5d1d575e87dfd8a378f385ce1d99c66956cbb17b.zip
s3: Remove smbd_server_conn from process_oplock_break_message
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/oplock.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 3f809b0812..8a43ea00bc 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -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