summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-08-02 23:05:31 +0200
committerStefan Metzmacher <metze@samba.org>2011-08-09 18:14:38 +0200
commit81e765582bb231a3e182c96777a0eef045095c9a (patch)
treeef866b2baadba9eef827d97ec58e9456d44beb4a /source3
parent70c2bbecde434264e0b54279f13159e9991efade (diff)
downloadsamba-81e765582bb231a3e182c96777a0eef045095c9a.tar.gz
samba-81e765582bb231a3e182c96777a0eef045095c9a.tar.bz2
samba-81e765582bb231a3e182c96777a0eef045095c9a.zip
s3:libsmb/cli*: use CLI_BUFFER_SIZE instead of cli->max_xmit
The max_data parameter of trans2/nttrans calls are not bound to cli->max_xmit. Even with cli->max_xmit, which means the max size of the whole SMB pdu, we would get fragmented trans2/nttrans replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Aug 9 18:14:38 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clidfs.c2
-rw-r--r--source3/libsmb/clifile.c8
-rw-r--r--source3/libsmb/clilist.c4
-rw-r--r--source3/libsmb/clirap.c14
4 files changed, 14 insertions, 14 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index a445649aed..a40ef896e8 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -654,7 +654,7 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx,
NULL, 0xffff, 0, 0,
setup, 1, 0,
param, param_len, 2,
- NULL, 0, cli->max_xmit,
+ NULL, 0, CLI_BUFFER_SIZE,
&recv_flags2,
NULL, 0, NULL, /* rsetup */
NULL, 0, NULL,
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index f9e3cbdced..2a30d2cda9 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -612,7 +612,7 @@ struct tevent_req *cli_posix_getfacl_send(TALLOC_CTX *mem_ctx,
return NULL;
}
subreq = cli_qpathinfo_send(state, ev, cli, fname, SMB_QUERY_POSIX_ACL,
- 0, cli->max_xmit);
+ 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -4142,7 +4142,7 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, uint16_t setup_val,
status = cli_trans(talloc_tos(), cli, SMBtrans2, NULL, -1, 0, 0,
setup, 1, 0,
param, param_len, 2,
- data, data_len, cli->max_xmit,
+ data, data_len, CLI_BUFFER_SIZE,
NULL,
NULL, 0, NULL, /* rsetup */
NULL, 0, NULL, /* rparam */
@@ -4327,7 +4327,7 @@ struct tevent_req *cli_get_ea_list_path_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_INFO_QUERY_ALL_EAS, 4,
- cli->max_xmit);
+ CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -5376,7 +5376,7 @@ struct tevent_req *cli_shadow_copy_data_send(TALLOC_CTX *mem_ctx,
return NULL;
}
state->get_names = get_names;
- ret_size = get_names ? cli->max_xmit : 16;
+ ret_size = get_names ? CLI_BUFFER_SIZE : 16;
SIVAL(state->setup + 0, 0, FSCTL_GET_SHADOW_COPY_DATA);
SSVAL(state->setup + 2, 0, fnum);
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index ba3dd2b2b5..ac10795920 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -599,7 +599,7 @@ static struct tevent_req *cli_list_trans_send(TALLOC_CTX *mem_ctx,
SMBtrans2, NULL, -1, 0, 0,
state->setup, 1, 0,
state->param, param_len, 10,
- NULL, 0, cli->max_xmit);
+ NULL, 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -783,7 +783,7 @@ static void cli_list_trans_done(struct tevent_req *subreq)
SMBtrans2, NULL, -1, 0, 0,
state->setup, 1, 0,
state->param, param_len, 10,
- NULL, 0, state->cli->max_xmit);
+ NULL, 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return;
}
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index b6cbec43fb..8e7dc68534 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -590,7 +590,7 @@ struct tevent_req *cli_qpathinfo1_send(TALLOC_CTX *mem_ctx,
}
state->cli = cli;
subreq = cli_qpathinfo_send(state, ev, cli, fname, SMB_INFO_STANDARD,
- 22, cli->max_xmit);
+ 22, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -766,7 +766,7 @@ struct tevent_req *cli_qpathinfo2_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_QUERY_FILE_ALL_INFO,
- 68, cli->max_xmit);
+ 68, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -901,7 +901,7 @@ struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_FILE_STREAM_INFORMATION,
- 0, cli->max_xmit);
+ 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -1079,7 +1079,7 @@ NTSTATUS cli_qfilename(struct cli_state *cli, uint16_t fnum,
status = cli_qfileinfo(talloc_tos(), cli, fnum,
SMB_QUERY_FILE_NAME_INFO,
- 4, cli->max_xmit, &recv_flags2,
+ 4, CLI_BUFFER_SIZE, &recv_flags2,
&rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -1133,7 +1133,7 @@ NTSTATUS cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
status = cli_qfileinfo(talloc_tos(), cli, fnum,
SMB_QUERY_FILE_ALL_INFO,
- 68, MIN(cli->max_xmit, 0xffff),
+ 68, CLI_BUFFER_SIZE,
NULL,
&rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
@@ -1192,7 +1192,7 @@ struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_QUERY_FILE_BASIC_INFO,
- 36, cli->max_xmit);
+ 36, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -1283,7 +1283,7 @@ NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstrin
status = cli_qpathinfo(talloc_tos(), cli, fname,
SMB_QUERY_FILE_ALT_NAME_INFO,
- 4, cli->max_xmit, &rdata, &num_rdata);
+ 4, CLI_BUFFER_SIZE, &rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
return status;
}