s3/libsmb: Use smbXcli_conn_use_large_files instead of SMB1 specific test
authorLuk Claes <luk@debian.org>
Sun, 19 May 2013 17:22:11 +0000 (19:22 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 11 Jun 2013 12:46:00 +0000 (14:46 +0200)
Signed-off-by: Luk Claes <luk@debian.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/libsmb/clifile.c
source3/libsmb/clireadwrite.c

index 4b4e1a05fb57beee1948f0dee7e664c4d8ed6ec4..ad55429a6a61b39756d25c4589e048783a30f79d 100644 (file)
@@ -2835,7 +2835,7 @@ NTSTATUS cli_lock64(struct cli_state *cli, uint16_t fnum,
        int ltype;
        NTSTATUS status;
 
-       if (! (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES)) {
+       if (! smbXcli_conn_use_large_files(cli->conn)) {
                return cli_lock32(cli, fnum, offset, len, timeout, lock_type);
        }
 
@@ -2952,7 +2952,7 @@ NTSTATUS cli_unlock64(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (! (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES)) {
+       if (! smbXcli_conn_use_large_files(cli->conn)) {
                return cli_unlock(cli, fnum, offset, len);
        }
 
index 47e7f1bfd4c65880df772d3f68397fab80715733..d8c571c22bb8608a19bbdf9010f0b7dfe29e8f5c 100644 (file)
@@ -149,7 +149,7 @@ struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
        SSVAL(state->vwv + 8, 0, 0);
        SSVAL(state->vwv + 9, 0, 0);
 
-       if (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES) {
+       if (smbXcli_conn_use_large_files(cli->conn)) {
                SIVAL(state->vwv + 10, 0,
                      (((uint64_t)offset)>>32) & 0xffffffff);
                wct = 12;
@@ -834,7 +834,7 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx,
 {
        struct tevent_req *req, *subreq;
        struct cli_write_andx_state *state;
-       bool bigoffset = ((smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES) != 0);
+       bool bigoffset = (smbXcli_conn_use_large_files(cli->conn) != 0);
        uint8_t wct = bigoffset ? 14 : 12;
        size_t max_write = cli_write_max_bufsize(cli, mode, wct);
        uint16_t *vwv;