1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:libsmb/cli_np_tstream: s/TSTREAM_CLI_NP_BUF_SIZE/TSTREAM_CLI_NP_MAX_BUF_SIZE

This isn't the fixed buffer size anymore, as we use dynamic beffer
it's just the maximum size.

metze
This commit is contained in:
Stefan Metzmacher 2011-06-07 18:49:55 +02:00
parent ad1cf187fd
commit 957cfd23e1

View File

@ -45,7 +45,7 @@ static const struct tstream_context_ops tstream_cli_np_ops;
* otherwise we may get NT_STATUS_PIPE_BUSY on the SMBtrans request
* from NT4 servers. (See bug #8195)
*/
#define TSTREAM_CLI_NP_BUF_SIZE 4280
#define TSTREAM_CLI_NP_MAX_BUF_SIZE 4280
struct tstream_cli_np {
struct cli_state *cli;
@ -377,7 +377,7 @@ static void tstream_cli_np_writev_write_next(struct tevent_req *req)
}
cli_nps->write.ofs = 0;
cli_nps->write.left = MIN(left, TSTREAM_CLI_NP_BUF_SIZE);
cli_nps->write.left = MIN(left, TSTREAM_CLI_NP_MAX_BUF_SIZE);
cli_nps->write.buf = talloc_realloc(cli_nps, cli_nps->write.buf,
uint8_t, cli_nps->write.left);
if (tevent_req_nomem(cli_nps->write.buf, req)) {
@ -668,7 +668,7 @@ static void tstream_cli_np_readv_read_next(struct tevent_req *req)
}
subreq = cli_read_andx_send(state, state->ev, cli_nps->cli,
cli_nps->fnum, 0, TSTREAM_CLI_NP_BUF_SIZE);
cli_nps->fnum, 0, TSTREAM_CLI_NP_MAX_BUF_SIZE);
if (tevent_req_nomem(subreq, req)) {
return;
}
@ -704,7 +704,7 @@ static void tstream_cli_np_readv_trans_start(struct tevent_req *req)
NULL, 0, 0,
cli_nps->write.buf,
cli_nps->write.ofs,
TSTREAM_CLI_NP_BUF_SIZE);
TSTREAM_CLI_NP_MAX_BUF_SIZE);
if (tevent_req_nomem(subreq, req)) {
return;
}
@ -744,7 +744,7 @@ static void tstream_cli_np_readv_trans_done(struct tevent_req *subreq)
return;
}
if (received > TSTREAM_CLI_NP_BUF_SIZE) {
if (received > TSTREAM_CLI_NP_MAX_BUF_SIZE) {
tstream_cli_np_readv_disconnect_now(req, EIO, __location__);
return;
}
@ -818,7 +818,7 @@ static void tstream_cli_np_readv_read_done(struct tevent_req *subreq)
return;
}
if (received > TSTREAM_CLI_NP_BUF_SIZE) {
if (received > TSTREAM_CLI_NP_MAX_BUF_SIZE) {
TALLOC_FREE(subreq);
tstream_cli_np_readv_disconnect_now(req, EIO, __location__);
return;