s3:libsmb: Plumb cli_smb2_qpathinfo2() inside cli_qpathinfo2().
authorJeremy Allison <jra@samba.org>
Wed, 7 Aug 2013 23:45:05 +0000 (16:45 -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/clirap.c

index 12a340c5c3b953513e9bd0c64aaef1883c52f59f..41608dd73284d2d8eb268c98a505992516082d7f 100644 (file)
@@ -845,11 +845,25 @@ NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
                        off_t *size, uint16 *mode,
                        SMB_INO_T *ino)
 {
-       TALLOC_CTX *frame = talloc_stackframe();
+       TALLOC_CTX *frame = NULL;
        struct tevent_context *ev;
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
+       if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+               return cli_smb2_qpathinfo2(cli,
+                                       fname,
+                                       create_time,
+                                       access_time,
+                                       write_time,
+                                       change_time,
+                                       size,
+                                       mode,
+                                       ino);
+       }
+
+       frame = talloc_stackframe();
+
        if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight