s3:torture/*: use CLI_BUFFER_SIZE instead of cli->max_xmit
authorStefan Metzmacher <metze@samba.org>
Tue, 2 Aug 2011 20:59:54 +0000 (22:59 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 9 Aug 2011 13:30:04 +0000 (15:30 +0200)
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

source3/torture/nbench.c
source3/torture/scanner.c

index d2fddf0094532078a28e4081f86e2ea419653d98..612dc7db9c51cb01b1594ddae184706e3afcafb7 100644 (file)
@@ -298,7 +298,7 @@ static struct tevent_req *nbench_cmd_send(TALLOC_CTX *mem_ctx,
                }
                subreq = cli_qpathinfo_send(state, ev, nb_state->cli, fname,
                                            ival(state->cmd->params[2]),
-                                           0, nb_state->cli->max_xmit);
+                                           0, CLI_BUFFER_SIZE);
                break;
        }
        default:
index 5edd52d56791c2ad7bd204ad7c21cd808775b3a3..580dadf80e677147ed0f11bb5232ccda256cd82b 100644 (file)
@@ -67,7 +67,7 @@ static NTSTATUS try_trans2(struct cli_state *cli,
                           op, 0,
                           NULL, 0, 0, /* setup */
                           param, param_len, 2,
-                          data, data_len, cli->max_xmit,
+                          data, data_len, CLI_BUFFER_SIZE,
                           NULL,                /* recv_flags2 */
                           NULL, 0, NULL,       /* rsetup */
                           &rparam, 0, rparam_len,
@@ -313,7 +313,7 @@ static NTSTATUS try_nttrans(struct cli_state *cli,
                           op, 0,
                           NULL, 0, 0, /* setup */
                           param, param_len, 2,
-                          data, data_len, cli->max_xmit,
+                          data, data_len, CLI_BUFFER_SIZE,
                           NULL,                /* recv_flags2 */
                           NULL, 0, NULL,       /* rsetup */
                           &rparam, 0, rparam_len,