Author: tridge Date: 2004-10-29 06:01:00 +0000 (Fri, 29 Oct 2004) New Revision: 3354
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3354 Log: honor "max xmit" and "max mux" from smb.conf in our client code. This is important as it allows the test suite to exercise the multiple reply logic in smbd for trans2 search replies. Modified: branches/SAMBA_4_0/source/include/cli_context.h branches/SAMBA_4_0/source/libcli/raw/clisession.c branches/SAMBA_4_0/source/libcli/raw/clitransport.c branches/SAMBA_4_0/source/libcli/raw/rawnegotiate.c Changeset: Modified: branches/SAMBA_4_0/source/include/cli_context.h =================================================================== --- branches/SAMBA_4_0/source/include/cli_context.h 2004-10-29 05:58:22 UTC (rev 3353) +++ branches/SAMBA_4_0/source/include/cli_context.h 2004-10-29 06:01:00 UTC (rev 3354) @@ -91,6 +91,8 @@ uint_t use_oplocks:1; uint_t use_level2_oplocks:1; uint_t use_spnego:1; + uint32_t max_xmit; + uint16_t max_mux; }; /* this is the context for the client transport layer */ Modified: branches/SAMBA_4_0/source/libcli/raw/clisession.c =================================================================== --- branches/SAMBA_4_0/source/libcli/raw/clisession.c 2004-10-29 05:58:22 UTC (rev 3353) +++ branches/SAMBA_4_0/source/libcli/raw/clisession.c 2004-10-29 06:01:00 UTC (rev 3354) @@ -263,8 +263,8 @@ /* use the old interface */ s2.generic.level = RAW_SESSSETUP_OLD; - s2.old.in.bufsize = ~0; - s2.old.in.mpx_max = 50; + s2.old.in.bufsize = session->transport->options.max_xmit; + s2.old.in.mpx_max = session->transport->options.max_mux; s2.old.in.vc_num = 1; s2.old.in.sesskey = parms->generic.in.sesskey; s2.old.in.domain = parms->generic.in.domain; @@ -311,8 +311,8 @@ union smb_sesssetup s2; s2.generic.level = RAW_SESSSETUP_NT1; - s2.nt1.in.bufsize = ~0; - s2.nt1.in.mpx_max = 50; + s2.nt1.in.bufsize = session->transport->options.max_xmit; + s2.nt1.in.mpx_max = session->transport->options.max_mux; s2.nt1.in.vc_num = 1; s2.nt1.in.sesskey = parms->generic.in.sesskey; s2.nt1.in.capabilities = parms->generic.in.capabilities; @@ -371,8 +371,8 @@ const char *chosen_oid; s2.generic.level = RAW_SESSSETUP_SPNEGO; - s2.spnego.in.bufsize = ~0; - s2.spnego.in.mpx_max = 50; + s2.spnego.in.bufsize = session->transport->options.max_xmit; + s2.spnego.in.mpx_max = session->transport->options.max_mux; s2.spnego.in.vc_num = 1; s2.spnego.in.sesskey = parms->generic.in.sesskey; s2.spnego.in.capabilities = parms->generic.in.capabilities; Modified: branches/SAMBA_4_0/source/libcli/raw/clitransport.c =================================================================== --- branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2004-10-29 05:58:22 UTC (rev 3353) +++ branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2004-10-29 06:01:00 UTC (rev 3354) @@ -76,7 +76,10 @@ transport->socket = talloc_reference(transport, sock); transport->negotiate.protocol = PROTOCOL_NT1; transport->options.use_spnego = lp_use_spnego(); - transport->negotiate.max_xmit = ~0; + transport->options.max_xmit = lp_max_xmit(); + transport->options.max_mux = lp_maxmux(); + + transport->negotiate.max_xmit = transport->options.max_xmit; smbcli_init_signing(transport); Modified: branches/SAMBA_4_0/source/libcli/raw/rawnegotiate.c =================================================================== --- branches/SAMBA_4_0/source/libcli/raw/rawnegotiate.c 2004-10-29 05:58:22 UTC (rev 3353) +++ branches/SAMBA_4_0/source/libcli/raw/rawnegotiate.c 2004-10-29 06:01:00 UTC (rev 3354) @@ -169,7 +169,7 @@ /* the old core protocol */ transport->negotiate.sec_mode = 0; transport->negotiate.server_time = time(NULL); - transport->negotiate.max_xmit = ~0; + transport->negotiate.max_xmit = transport->options.max_xmit; transport->negotiate.server_zone = get_time_zone(transport->negotiate.server_time); }