summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-13 08:11:58 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-13 12:36:35 +0100
commite09c675596bb7ae44fda7ee0ba7423761eb4e2e1 (patch)
tree489d59bdd9b8f7a03c99e9a06c9d52bba1073bea
parent173ea71686fa5ba34f418d6085a68c1c983659c5 (diff)
downloadsamba-e09c675596bb7ae44fda7ee0ba7423761eb4e2e1.tar.gz
samba-e09c675596bb7ae44fda7ee0ba7423761eb4e2e1.tar.bz2
samba-e09c675596bb7ae44fda7ee0ba7423761eb4e2e1.zip
s3:smbd/open: pass smbd_server_connection as private_data to msg_file_was_renamed()
metze
-rw-r--r--source3/smbd/open.c6
-rw-r--r--source3/smbd/process.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index fceebcb6dd..a697ee86b5 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2992,7 +2992,6 @@ 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;
@@ -3002,10 +3001,11 @@ void msg_file_was_renamed(struct messaging_context *msg,
struct smb_filename *smb_fname = NULL;
size_t sp_len, bn_len;
NTSTATUS status;
+ struct smbd_server_connection *sconn =
+ talloc_get_type(private_data,
+ struct smbd_server_connection);
- sconn = msg_ctx_to_sconn(msg);
if (sconn == NULL) {
- DEBUG(1, ("could not find sconn\n"));
return;
}
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 51783fa67c..ad5c096e05 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -3139,7 +3139,7 @@ void smbd_process(struct tevent_context *ev_ctx,
MSG_SMB_FORCE_TDIS, msg_force_tdis);
messaging_register(sconn->msg_ctx, sconn,
MSG_SMB_CLOSE_FILE, msg_close_file);
- messaging_register(sconn->msg_ctx, NULL,
+ messaging_register(sconn->msg_ctx, sconn,
MSG_SMB_FILE_RENAME, msg_file_was_renamed);
/*