summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/close.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index df7e156fe5..09d8905c17 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -160,7 +160,7 @@ static NTSTATUS close_filestruct(files_struct *fsp)
If any deferred opens are waiting on this close, notify them.
****************************************************************************/
-static void notify_deferred_opens(struct messaging_context *msg_ctx,
+static void notify_deferred_opens(struct smbd_server_connection *sconn,
struct share_mode_lock *lck)
{
int i;
@@ -177,24 +177,20 @@ static void notify_deferred_opens(struct messaging_context *msg_ctx,
}
if (procid_is_me(&e->pid)) {
- struct smbd_server_connection *sconn;
/*
* We need to notify ourself to retry the open. Do
* this by finding the queued SMB record, moving it to
* the head of the queue and changing the wait time to
* zero.
*/
- sconn = msg_ctx_to_sconn(msg_ctx);
- if (sconn != NULL) {
- schedule_deferred_open_message_smb(
- sconn, e->op_mid);
- }
+ schedule_deferred_open_message_smb(sconn, e->op_mid);
} else {
char msg[MSG_SMB_SHARE_MODE_ENTRY_SIZE];
share_mode_entry_to_message(msg, e);
- messaging_send_buf(msg_ctx, e->pid, MSG_SMB_OPEN_RETRY,
+ messaging_send_buf(sconn->msg_ctx, e->pid,
+ MSG_SMB_OPEN_RETRY,
(uint8 *)msg,
MSG_SMB_SHARE_MODE_ENTRY_SIZE);
}
@@ -378,7 +374,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
}
/* Notify any deferred opens waiting on this close. */
- notify_deferred_opens(conn->sconn->msg_ctx, lck);
+ notify_deferred_opens(conn->sconn, lck);
reply_to_oplock_break_requests(fsp);
/*