From 4d44f879e12106f83491a877ddef6c6ee9232d7e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 12 Dec 2011 15:45:07 +0100 Subject: s3:smbd/clode: pass smbd_server_connection as private_data to msg_close_file() metze --- source3/smbd/close.c | 6 +++--- source3/smbd/process.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 8fd6b1f521..df7e156fe5 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -1138,13 +1138,13 @@ void msg_close_file(struct messaging_context *msg_ctx, struct server_id server_id, DATA_BLOB *data) { - struct smbd_server_connection *sconn; files_struct *fsp = NULL; struct share_mode_entry e; + struct smbd_server_connection *sconn = + talloc_get_type(private_data, + struct smbd_server_connection); - sconn = msg_ctx_to_sconn(msg_ctx); if (sconn == NULL) { - DEBUG(1, ("could not find sconn\n")); return; } diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 64dec5291c..0d17ad7f8c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -3137,7 +3137,7 @@ void smbd_process(struct tevent_context *ev_ctx, /* register our message handlers */ messaging_register(sconn->msg_ctx, NULL, MSG_SMB_FORCE_TDIS, msg_force_tdis); - messaging_register(sconn->msg_ctx, NULL, + messaging_register(sconn->msg_ctx, sconn, MSG_SMB_CLOSE_FILE, msg_close_file); /* -- cgit