summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-07 15:59:13 -0700
committerStefan Metzmacher <metze@samba.org>2013-08-15 09:07:06 +0200
commitc748a959b40f184190cd537f0ad5f0772b484841 (patch)
treec29322fe6b2354c369b546c4d2bd419b14209dc7 /source3
parent28591dfd5d2163d9181d45d64a4a750e335b7c56 (diff)
downloadsamba-c748a959b40f184190cd537f0ad5f0772b484841.tar.gz
samba-c748a959b40f184190cd537f0ad5f0772b484841.tar.bz2
samba-c748a959b40f184190cd537f0ad5f0772b484841.zip
s3:libsmb: Plumb cli_smb2_rename() inside cli_rename().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clifile.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 4b4e1a05fb..bfc398494a 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1097,11 +1097,19 @@ NTSTATUS cli_rename_recv(struct tevent_req *req)
NTSTATUS cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
{
- 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_rename(cli,
+ fname_src,
+ fname_dst);
+ }
+
+ frame = talloc_stackframe();
+
if (smbXcli_conn_has_async_calls(cli->conn)) {
/*
* Can't use sync call while an async call is in flight