summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-13 13:18:47 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-13 20:31:09 +0100
commitda4b503581be43558257940d0a63931920966868 (patch)
tree83b82105034e60840455159afc80d0b4b67a30cd
parent21de67357509f18817dd202431017a7aa15e8495 (diff)
downloadsamba-da4b503581be43558257940d0a63931920966868.tar.gz
samba-da4b503581be43558257940d0a63931920966868.tar.bz2
samba-da4b503581be43558257940d0a63931920966868.zip
s3:smbd/oplock: pass sconn as private_data to process_oplock_break_message()
metze
-rw-r--r--source3/smbd/oplock.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index af0d9127be..04f266c1c8 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -487,19 +487,19 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
struct server_id src,
DATA_BLOB *data)
{
- struct smbd_server_connection *sconn;
struct share_mode_entry msg;
files_struct *fsp;
bool break_to_level2 = False;
+ struct smbd_server_connection *sconn =
+ talloc_get_type(private_data,
+ struct smbd_server_connection);
- if (data->data == NULL) {
- DEBUG(0, ("Got NULL buffer\n"));
+ if (sconn == NULL) {
return;
}
- sconn = msg_ctx_to_sconn(msg_ctx);
- if (sconn == NULL) {
- DEBUG(1, ("could not find sconn\n"));
+ if (data->data == NULL) {
+ DEBUG(0, ("Got NULL buffer\n"));
return;
}
@@ -934,7 +934,7 @@ bool init_oplocks(struct smbd_server_connection *sconn)
{
DEBUG(3,("init_oplocks: initializing messages.\n"));
- messaging_register(sconn->msg_ctx, NULL, MSG_SMB_BREAK_REQUEST,
+ messaging_register(sconn->msg_ctx, sconn, MSG_SMB_BREAK_REQUEST,
process_oplock_break_message);
messaging_register(sconn->msg_ctx, NULL, MSG_SMB_ASYNC_LEVEL2_BREAK,
process_oplock_async_level2_break_message);