summaryrefslogtreecommitdiff
path: root/source3/smbd/ipc.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-03-28 16:14:09 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-25 20:55:06 +0200
commitfaa8edccef556fb281d24b76b9739c994128f6ef (patch)
tree451ed88a7e676adc61fafd51c75637855507de78 /source3/smbd/ipc.c
parent463b308f16733b5a0bd896c46347d39064cee170 (diff)
downloadsamba-faa8edccef556fb281d24b76b9739c994128f6ef.tar.gz
samba-faa8edccef556fb281d24b76b9739c994128f6ef.tar.bz2
samba-faa8edccef556fb281d24b76b9739c994128f6ef.zip
s3:smbd: make use of smbXsrv_tcon for smb1
Pair-Programmed-With: Michael Adam <obnox@samba.org> metze
Diffstat (limited to 'source3/smbd/ipc.c')
-rw-r--r--source3/smbd/ipc.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 77b9249e6f..91d5047c4c 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -631,8 +631,30 @@ static void handle_trans(connection_struct *conn, struct smb_request *req,
state->max_param_return);
if (state->close_on_completion) {
- close_cnum(conn,state->vuid);
+ struct smbXsrv_tcon *tcon;
+ NTSTATUS status;
+
+ tcon = conn->tcon;
req->conn = NULL;
+ conn = NULL;
+
+ /*
+ * TODO: cancel all outstanding requests on the tcon
+ */
+ status = smbXsrv_tcon_disconnect(tcon, state->vuid);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("handle_trans: "
+ "smbXsrv_tcon_disconnect() failed: %s\n",
+ nt_errstr(status)));
+ /*
+ * If we hit this case, there is something completely
+ * wrong, so we better disconnect the transport connection.
+ */
+ exit_server(__location__ ": smbXsrv_tcon_disconnect failed");
+ return;
+ }
+
+ TALLOC_FREE(tcon);
}
return;