summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-10-03 17:34:43 +0200
committerVolker Lendecke <vl@samba.org>2010-10-03 18:17:09 +0200
commitdb607331d353dc43e1a7cb11e7af0ce7e38faf9a (patch)
tree487c1983183b7da5e0fac38af3a30f8b3cd4f8cf /source3/smbd
parent3cf3d54fbc3c28e40d3e23543c0fef1c9e81559a (diff)
downloadsamba-db607331d353dc43e1a7cb11e7af0ce7e38faf9a.tar.gz
samba-db607331d353dc43e1a7cb11e7af0ce7e38faf9a.tar.bz2
samba-db607331d353dc43e1a7cb11e7af0ce7e38faf9a.zip
s3: Remove smbd_server_conn from msg_file_was_renamed
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index d7927b7502..d3953319fe 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2734,6 +2734,7 @@ void msg_file_was_renamed(struct messaging_context *msg,
struct server_id server_id,
DATA_BLOB *data)
{
+ struct smbd_server_connection *sconn;
files_struct *fsp;
char *frm = (char *)data->data;
struct file_id id;
@@ -2744,6 +2745,12 @@ void msg_file_was_renamed(struct messaging_context *msg,
size_t sp_len, bn_len;
NTSTATUS status;
+ sconn = msg_ctx_to_sconn(msg);
+ if (sconn == NULL) {
+ DEBUG(1, ("could not find sconn\n"));
+ return;
+ }
+
if (data->data == NULL
|| data->length < MSG_FILE_RENAMED_MIN_SIZE + 2) {
DEBUG(0, ("msg_file_was_renamed: Got invalid msg len %d\n",
@@ -2775,7 +2782,7 @@ void msg_file_was_renamed(struct messaging_context *msg,
sharepath, smb_fname_str_dbg(smb_fname),
file_id_string_tos(&id)));
- for(fsp = file_find_di_first(smbd_server_conn, id); fsp;
+ for(fsp = file_find_di_first(sconn, id); fsp;
fsp = file_find_di_next(fsp)) {
if (memcmp(fsp->conn->connectpath, sharepath, sp_len) == 0) {