summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-12 16:07:19 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-12 21:49:11 +0100
commit77dc976b53490e06dff649f199033fe799b714bf (patch)
tree85a76ecfad8788c80ee15ea3645a18fcd953fa04 /source3
parent4d44f879e12106f83491a877ddef6c6ee9232d7e (diff)
downloadsamba-77dc976b53490e06dff649f199033fe799b714bf.tar.gz
samba-77dc976b53490e06dff649f199033fe799b714bf.tar.bz2
samba-77dc976b53490e06dff649f199033fe799b714bf.zip
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
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);
/*