1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

s3:smbd/close: pass smbd_server_connection to notify_deferred_opens()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 12 21:49:11 CET 2011 on sn-devel-104
This commit is contained in:
Stefan Metzmacher
2011-12-12 16:07:19 +01:00
parent 4d44f879e1
commit 77dc976b53

View File

@ -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);
/*