s3:libsmb: Plumb cli_smb2_getatr() inside cli_getatr().
authorJeremy Allison <jra@samba.org>
Wed, 14 Aug 2013 21:37:11 +0000 (14:37 -0700)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Aug 2013 07:07:07 +0000 (09:07 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/libsmb/clifile.c

index 4ac7313ad3c8df5bfa9551ee75d06fe4de551aab..f67411856b1e5e331173f66d6a0abd968e769e8e 100644 (file)
@@ -3538,11 +3538,21 @@ NTSTATUS cli_getatr(struct cli_state *cli,
                        off_t *size,
                        time_t *write_time)
 {
-       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_getatr(cli,
+                                       fname,
+                                       attr,
+                                       size,
+                                       write_time);
+       }
+
+       frame = talloc_stackframe();
+
        if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight