]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
For large smbwrite&x, we need more than 64k bcc
authorVolker Lendecke <vl@samba.org>
Fri, 19 Dec 2008 15:11:14 +0000 (16:11 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 19 Dec 2008 15:13:27 +0000 (16:13 +0100)
source3/include/async_smb.h
source3/libsmb/async_smb.c

index fd0b0d2c539fd76cb0e54b1d2f9de375dfa86eec..f8f94aa4c9c762a8ddacc85ec961db494c47da4d 100644 (file)
@@ -120,7 +120,7 @@ struct async_req *cli_request_send(TALLOC_CTX *mem_ctx,
                                   uint8_t additional_flags,
                                   uint8_t wct, const uint16_t *vwv,
                                   size_t bytes_alignment,
-                                  uint16_t num_bytes, const uint8_t *bytes);
+                                  uint32_t num_bytes, const uint8_t *bytes);
 
 bool cli_chain_cork(struct cli_state *cli, struct event_context *ev,
                    size_t size_hint);
@@ -129,7 +129,7 @@ bool cli_in_chain(struct cli_state *cli);
 bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
                      uint8_t wct, const uint16_t *vwv,
                      size_t bytes_alignment,
-                     uint16_t num_bytes, const uint8_t *bytes);
+                     uint32_t num_bytes, const uint8_t *bytes);
 
 NTSTATUS cli_pull_reply(struct async_req *req,
                        uint8_t *pwct, uint16_t **pvwv,
index 3b7442a6803c9d2ea6b8054a5bc44ba748e8507a..a5ce505908e14a67af93cd545728cc48d98e8299 100644 (file)
@@ -234,7 +234,7 @@ static bool find_andx_cmd_ofs(char *buf, size_t *pofs)
 bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
                      uint8_t wct, const uint16_t *vwv,
                      size_t bytes_alignment,
-                     uint16_t num_bytes, const uint8_t *bytes)
+                     uint32_t num_bytes, const uint8_t *bytes)
 {
        char *outbuf;
        size_t old_size, new_size;
@@ -274,7 +274,7 @@ bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
 
        new_size += bytes_padding + num_bytes;
 
-       if (new_size > 0xffff) {
+       if ((smb_command != SMBwriteX) && (new_size > 0xffff)) {
                DEBUG(1, ("splice_chain: %u bytes won't fit\n",
                          (unsigned)new_size));
                return false;
@@ -417,7 +417,7 @@ static struct async_req *cli_request_chain(TALLOC_CTX *mem_ctx,
                                           uint8_t additional_flags,
                                           uint8_t wct, const uint16_t *vwv,
                                           size_t bytes_alignment,
-                                          uint16_t num_bytes,
+                                          uint32_t num_bytes,
                                           const uint8_t *bytes)
 {
        struct async_req **tmp_reqs;
@@ -606,7 +606,7 @@ struct async_req *cli_request_send(TALLOC_CTX *mem_ctx,
                                   uint8_t additional_flags,
                                   uint8_t wct, const uint16_t *vwv,
                                   size_t bytes_alignment,
-                                  uint16_t num_bytes, const uint8_t *bytes)
+                                  uint32_t num_bytes, const uint8_t *bytes)
 {
        struct async_req *result;
        bool uncork = false;