summaryrefslogtreecommitdiffstats
path: root/source/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-02 12:21:34 -0700
committerJeremy Allison <jra@samba.org>2007-11-02 12:21:34 -0700
commit81ca5853b2475f123faab3b550f0a7b24ae3c208 (patch)
treeddbe726a3b176765b3a37698cd39a70a5f184b1e /source/include
parent319dfbaf1b8d08171731d4575127f4bb5255a229 (diff)
downloadsamba-81ca5853b2475f123faab3b550f0a7b24ae3c208.tar.gz
samba-81ca5853b2475f123faab3b550f0a7b24ae3c208.tar.xz
samba-81ca5853b2475f123faab3b550f0a7b24ae3c208.zip
Change the client library to write directly out of
the incoming buffer in the non-signed case. Speeds up writes by over 10% or so. Complete the server recvfile implementation. Jeremy.
Diffstat (limited to 'source/include')
-rw-r--r--source/include/client.h1
-rw-r--r--source/include/smb_macros.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/source/include/client.h b/source/include/client.h
index c4669dbf2ee..e38017fe7b4 100644
--- a/source/include/client.h
+++ b/source/include/client.h
@@ -29,6 +29,7 @@
#define CLI_SAMBA_MAX_LARGE_READX_SIZE (127*1024) /* Works for Samba servers */
#define CLI_WINDOWS_MAX_LARGE_READX_SIZE ((64*1024)-2) /* Windows servers are broken.... */
#define CLI_SAMBA_MAX_POSIX_LARGE_READX_SIZE (0xFFFF00) /* 24-bit len. */
+#define CLI_SAMBA_MAX_POSIX_LARGE_WRITEX_SIZE (0xFFFF00) /* 24-bit len. */
/*
* These definitions depend on smb.h
diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h
index 9af63451b07..0dfb5969948 100644
--- a/source/include/smb_macros.h
+++ b/source/include/smb_macros.h
@@ -193,8 +193,8 @@
buf[2] = (len&0xFF00)>>8; buf[3] = len&0xFF; } while (0)
#define smb_len_large(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|(PVAL(buf,1)<<16))
-#define _smb_setlen_large(buf,len) do { buf[0] = 0; buf[1] = (len&0xFF0000)>>16; \
- buf[2] = (len&0xFF00)>>8; buf[3] = len&0xFF; } while (0)
+#define _smb_setlen_large(buf,len) do { buf[0] = 0; buf[1] = ((len)&0xFF0000)>>16; \
+ buf[2] = ((len)&0xFF00)>>8; buf[3] = (len)&0xFF; } while (0)
/*******************************************************************
find the difference in milliseconds between two struct timeval