summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 16:31:58 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-15 12:12:24 +0200
commit8f44105cc424a7f0a354ac06d5022c72ce73b004 (patch)
tree138bbbe62a2daedca526039d6f59cea73aafec8f /source3
parent768581eee524540ef576ce2cf56c0b5fbfe862d9 (diff)
downloadsamba-8f44105cc424a7f0a354ac06d5022c72ce73b004.tar.gz
samba-8f44105cc424a7f0a354ac06d5022c72ce73b004.tar.bz2
samba-8f44105cc424a7f0a354ac06d5022c72ce73b004.zip
s3:libsmb: move cli->max_mux to cli->conn.smb1.server.max_mux
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/include/client.h2
-rw-r--r--source3/libsmb/cliconnect.c11
-rw-r--r--source3/libsmb/clientgen.c2
3 files changed, 9 insertions, 6 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 3701aec554..1e3ab50949 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -70,7 +70,6 @@ struct cli_state {
int readbraw_supported;
int writebraw_supported;
int timeout; /* in milliseconds. */
- size_t max_mux;
int initialised;
int win95;
bool is_guestlogin;
@@ -135,6 +134,7 @@ struct cli_state {
struct {
uint32_t capabilities;
uint32_t max_xmit;
+ uint16_t max_mux;
} server;
uint32_t capabilities;
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 1abd76018a..50014f57f7 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2614,6 +2614,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
uint32_t client_max_xmit = cli->conn.smb1.client.max_xmit;
uint32_t server_max_xmit = 0;
uint32_t max_xmit;
+ uint32_t server_max_mux = 0;
enum protocol_types protocol;
status = cli_smb_recv(subreq, state, &inbuf, 1, &wct, &vwv,
@@ -2656,7 +2657,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
/* NT protocol */
cli->sec_mode = CVAL(vwv + 1, 0);
- cli->max_mux = SVAL(vwv + 1, 1);
+ server_max_mux = SVAL(vwv + 1, 1);
server_max_xmit = IVAL(vwv + 3, 1);
cli->sesskey = IVAL(vwv + 7, 1);
cli->serverzone = SVALS(vwv + 15, 1);
@@ -2719,7 +2720,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli->sec_mode = SVAL(vwv + 1, 0);
server_max_xmit = SVAL(vwv + 2, 0);
- cli->max_mux = SVAL(vwv + 3, 0);
+ server_max_mux = SVAL(vwv + 3, 0);
cli->sesskey = IVAL(vwv + 6, 0);
cli->serverzone = SVALS(vwv + 10, 0);
cli->serverzone *= 60;
@@ -2734,7 +2735,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli->sec_mode = 0;
cli->serverzone = get_time_zone(time(NULL));
server_max_xmit = 1024;
- cli->max_mux = 1;
+ server_max_mux = 1;
}
if (server_max_xmit < 1024) {
@@ -2742,7 +2743,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
return;
}
- if (cli->max_mux < 1) {
+ if (server_max_mux < 1) {
tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
return;
}
@@ -2769,6 +2770,8 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli->conn.smb1.server.max_xmit = server_max_xmit;
cli->conn.smb1.max_xmit = max_xmit;
+ cli->conn.smb1.server.max_mux = server_max_mux;
+
tevent_req_done(req);
}
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 9091ad38d8..aef31b5aa0 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -563,7 +563,7 @@ uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs)
uint16_t cli_state_max_requests(struct cli_state *cli)
{
- return cli->max_mux;
+ return cli->conn.smb1.server.max_mux;
}
uint16_t cli_state_security_mode(struct cli_state *cli)