summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-07 16:10:34 -0700
committerStefan Metzmacher <metze@samba.org>2013-08-15 09:07:06 +0200
commit85f60cc3d8f68ce5eb687cc6e367bb66bdef8b99 (patch)
treea0a7f75455feb2295a1ff89f42a3fe377e6b0026 /source3/libsmb
parentc1c4491d5e5bb16c274fe4fe162156a7ec910b93 (diff)
downloadsamba-85f60cc3d8f68ce5eb687cc6e367bb66bdef8b99.tar.gz
samba-85f60cc3d8f68ce5eb687cc6e367bb66bdef8b99.tar.bz2
samba-85f60cc3d8f68ce5eb687cc6e367bb66bdef8b99.zip
s3:libsmb: Plumb cli_smb2_close_fnum() inside cli_close().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clifile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 3c799a68a3..571e1cc68c 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -2536,11 +2536,17 @@ NTSTATUS cli_close_recv(struct tevent_req *req)
NTSTATUS cli_close(struct cli_state *cli, uint16_t fnum)
{
- TALLOC_CTX *frame = talloc_stackframe();
+ TALLOC_CTX *frame = NULL;
struct tevent_context *ev;
struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK;
+ if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+ return cli_smb2_close_fnum(cli, fnum);
+ }
+
+ frame = talloc_stackframe();
+
if (smbXcli_conn_has_async_calls(cli->conn)) {
/*
* Can't use sync call while an async call is in flight