summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-29 05:31:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:59 -0500
commitb2df91639065168643ea8b921f24b879daf2e71f (patch)
tree0ef0aa074e63b7db316c67f787fea17a9f37e097 /source4
parent78b85c96c946069cd16ad7399b0dd8cfb7e2590b (diff)
downloadsamba-b2df91639065168643ea8b921f24b879daf2e71f.tar.gz
samba-b2df91639065168643ea8b921f24b879daf2e71f.tar.bz2
samba-b2df91639065168643ea8b921f24b879daf2e71f.zip
r3352: make smbcli_read() and smbcli_write() work with very small negotiated SMB buffer sizes
(This used to be commit 320ca0214d97dc6cebb00ddc98a1eb71e2b4c917)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/clireadwrite.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/libcli/clireadwrite.c b/source4/libcli/clireadwrite.c
index 45c99f4f89..f8220526e3 100644
--- a/source4/libcli/clireadwrite.c
+++ b/source4/libcli/clireadwrite.c
@@ -42,8 +42,7 @@ ssize_t smbcli_read(struct smbcli_tree *tree, int fnum, char *buf, off_t offset,
* Set readsize to the maximum size we can handle in one readX,
* rounded down to a multiple of 1024.
*/
- readsize = (tree->session->transport->negotiate.max_xmit -
- (MIN_SMB_SIZE+32)) & ~1023;
+ readsize = (tree->session->transport->negotiate.max_xmit - (MIN_SMB_SIZE+32));
if (readsize > 0xFFFF) readsize = 0xFFFF;
while (total < size) {
@@ -87,7 +86,7 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
const uint8_t *buf, off_t offset, size_t size)
{
union smb_write parms;
- int block = (tree->session->transport->negotiate.max_xmit - (MIN_SMB_SIZE+32)) & ~1023;
+ int block = (tree->session->transport->negotiate.max_xmit - (MIN_SMB_SIZE+32));
ssize_t total = 0;
if (size == 0) {