From cfebce3c56474ac914474b57ed94f93418b0564b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 12 Feb 2013 17:44:51 +0100 Subject: s3:smbd: add debugging to close code (regarding disconnect of a durable) Signed-off-by: Michael Adam Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Mon Feb 18 17:42:45 CET 2013 on sn-devel-104 --- source3/smbd/close.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 9e7ccc7c05..df3ae23a92 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -783,6 +783,17 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp, fsp->op->global->backend_cookie = new_cookie; tmp = smbXsrv_open_close(fsp->op, now); + if (!NT_STATUS_IS_OK(tmp)) { + DEBUG(1, ("Failed to update smbXsrv_open " + "record when disconnecting durable " + "handle for file %s: %s - " + "proceeding with normal close\n", + fsp_str_dbg(fsp), nt_errstr(tmp))); + } + } else { + DEBUG(1, ("Failed to disconnect durable handle for " + "file %s: %s - proceeding with normal " + "close\n", fsp_str_dbg(fsp), nt_errstr(tmp))); } if (!NT_STATUS_IS_OK(tmp)) { is_durable = false; @@ -795,6 +806,9 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp, * a durable handle and closed the underlying file. * In all other cases, we proceed with a genuine close. */ + DEBUG(10, ("%s disconnected durable handle for file %s\n", + conn->session_info->unix_info->unix_name, + fsp_str_dbg(fsp))); file_free(req, fsp); return NT_STATUS_OK; } -- cgit