1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:smbd: add debugging to close code (regarding disconnect of a durable)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Feb 18 17:42:45 CET 2013 on sn-devel-104
This commit is contained in:
Michael Adam 2013-02-12 17:44:51 +01:00 committed by Stefan Metzmacher
parent 295444266d
commit cfebce3c56

View File

@ -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;
}