summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-02-28 20:39:36 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-02-28 20:39:36 +0000
commitda0a56a278232bad50ea0dd05de3b06299d66234 (patch)
tree38f0974d6caf71c698ae9d2ab2fcdace6ac8e28e /source3/smbd/server.c
parent0fb433564c6c8959ccd788f19012348634416ec1 (diff)
downloadsamba-da0a56a278232bad50ea0dd05de3b06299d66234.tar.gz
samba-da0a56a278232bad50ea0dd05de3b06299d66234.tar.bz2
samba-da0a56a278232bad50ea0dd05de3b06299d66234.zip
Split maxxmit parameter into two : max_send (auto configured by the
connecting client, as per CIFS4) and max_recv, which can be configured as the old maxxmit was. Fixes problems with NT directory listings when maxxmit is set very small. jra@cygnus.com (This used to be commit c2d5d1040a933987a0c39545bb5bf8e2fc400a87)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 09c8fccb5c..1abcb8089f 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -67,7 +67,17 @@ int max_file_fd_used = 0;
extern int Protocol;
-int maxxmit = BUFFER_SIZE;
+/*
+ * Size of data we can send to client. Set
+ * by the client for all protocols above CORE.
+ * Set by us for CORE protocol.
+ */
+int max_send = BUFFER_SIZE;
+/*
+ * Size of the data we can receive. Set by us.
+ * Can be modified by the max xmit parameter.
+ */
+int max_recv = BUFFER_SIZE;
/* a fnum to use when chaining */
int chain_fnum = -1;
@@ -2592,7 +2602,7 @@ int reply_lanman1(char *outbuf)
}
CVAL(outbuf,smb_flg) = 0x81; /* Reply, SMBlockread, SMBwritelock supported */
- SSVAL(outbuf,smb_vwv2,maxxmit);
+ SSVAL(outbuf,smb_vwv2,max_recv);
SSVAL(outbuf,smb_vwv3,lp_maxmux()); /* maxmux */
SSVAL(outbuf,smb_vwv4,1);
SSVAL(outbuf,smb_vwv5,raw); /* tell redirector we support
@@ -2639,7 +2649,7 @@ int reply_lanman2(char *outbuf)
}
CVAL(outbuf,smb_flg) = 0x81; /* Reply, SMBlockread, SMBwritelock supported */
- SSVAL(outbuf,smb_vwv2,maxxmit);
+ SSVAL(outbuf,smb_vwv2,max_recv);
SSVAL(outbuf,smb_vwv3,lp_maxmux());
SSVAL(outbuf,smb_vwv4,1);
SSVAL(outbuf,smb_vwv5,raw); /* readbraw and/or writebraw */
@@ -3813,7 +3823,7 @@ static void process(void)
if (msg_type == 0)
show_msg(InBuffer);
- nread = construct_reply(InBuffer,OutBuffer,nread,maxxmit);
+ nread = construct_reply(InBuffer,OutBuffer,nread,max_send);
if(nread > 0) {
if (CVAL(OutBuffer,0) == 0)
@@ -4093,7 +4103,7 @@ static void usage(char *pname)
/* possibly reload the services file. */
reload_services(True);
- maxxmit = MIN(lp_maxxmit(),BUFFER_SIZE);
+ max_recv = MIN(lp_maxxmit(),BUFFER_SIZE);
if (*lp_rootdir())
{