diff options
author | Jeremy Allison <jra@samba.org> | 2013-08-07 16:16:03 -0700 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-08-15 09:07:06 +0200 |
commit | ea267a7e4b4c413336b2bf54eb53ffc8d1524b44 (patch) | |
tree | 2e2546491598279db81a8c7c0f18be1a9944c48b /source3/libsmb | |
parent | 83c410c99e3ef8db00dd002c1a1a93b0035cd2e7 (diff) | |
download | samba-ea267a7e4b4c413336b2bf54eb53ffc8d1524b44.tar.gz samba-ea267a7e4b4c413336b2bf54eb53ffc8d1524b44.tar.bz2 samba-ea267a7e4b4c413336b2bf54eb53ffc8d1524b44.zip |
s3:libsmb: Plumb cli_smb2_setatr() inside cli_setatr().
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.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index d0e9bb606b..4ac7313ad3 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -3786,11 +3786,20 @@ NTSTATUS cli_setatr(struct cli_state *cli, uint16_t attr, time_t mtime) { - TALLOC_CTX *frame = talloc_stackframe(); + TALLOC_CTX *frame = NULL; struct tevent_context *ev = NULL; struct tevent_req *req = NULL; NTSTATUS status = NT_STATUS_OK; + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + return cli_smb2_setatr(cli, + fname, + attr, + mtime); + } + + frame = talloc_stackframe(); + if (smbXcli_conn_has_async_calls(cli->conn)) { /* * Can't use sync call while an async call is in flight |