summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-07 16:00:40 -0700
committerStefan Metzmacher <metze@samba.org>2013-08-15 09:07:06 +0200
commit179c27dd0235c4949045eef2ffb7a87175a4483b (patch)
treea16d4bef583076f5ed349159129dee33dbfa3e59
parentc748a959b40f184190cd537f0ad5f0772b484841 (diff)
downloadsamba-179c27dd0235c4949045eef2ffb7a87175a4483b.tar.gz
samba-179c27dd0235c4949045eef2ffb7a87175a4483b.tar.bz2
samba-179c27dd0235c4949045eef2ffb7a87175a4483b.zip
s3:libsmb: Plumb cli_smb2_unlink() inside cli_unlink().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-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 bfc398494a..f2e4ac2231 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1415,11 +1415,17 @@ NTSTATUS cli_unlink_recv(struct tevent_req *req)
NTSTATUS cli_unlink(struct cli_state *cli, const char *fname, uint16_t mayhave_attrs)
{
- 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_unlink(cli, fname);
+ }
+
+ frame = talloc_stackframe();
+
if (smbXcli_conn_has_async_calls(cli->conn)) {
/*
* Can't use sync call while an async call is in flight