summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-07-07 14:00:09 +0200
committerStefan Metzmacher <metze@samba.org>2008-07-07 18:10:07 +0200
commit848ab7fa3be4c4fe2a103df365f0b6b41ee0736d (patch)
treeb25061d32ad267c71fd20f9dafecd5faf8a31512 /source4/libcli
parentfd1ce8c263adf84c665753bd7635d39d7ec533bc (diff)
downloadsamba-848ab7fa3be4c4fe2a103df365f0b6b41ee0736d.tar.gz
samba-848ab7fa3be4c4fe2a103df365f0b6b41ee0736d.tar.bz2
samba-848ab7fa3be4c4fe2a103df365f0b6b41ee0736d.zip
libcli/raw: trans(2) setup count is uint8_t
metze (This used to be commit 48ccb51caf7976ec07c8a9bfc1afd3076bf4ee22)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/rawtrans.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c
index 9f5e1da293..fb5f9fa8d0 100644
--- a/source4/libcli/raw/rawtrans.c
+++ b/source4/libcli/raw/rawtrans.c
@@ -109,7 +109,7 @@ static enum smbcli_request_state smb_raw_trans2_recv_helper(struct smbcli_reques
uint16_t param_count, param_ofs, param_disp;
uint16_t data_count, data_ofs, data_disp;
uint16_t total_data, total_param;
- uint16_t setup_count;
+ uint8_t setup_count;
/*
* An NT RPC pipe call can return ERRDOS, ERRmoredata
@@ -128,7 +128,7 @@ static enum smbcli_request_state smb_raw_trans2_recv_helper(struct smbcli_reques
total_data = SVAL(req->in.vwv, VWV(1));
total_param = SVAL(req->in.vwv, VWV(0));
- setup_count = SVAL(req->in.vwv, VWV(9));
+ setup_count = CVAL(req->in.vwv, VWV(9));
param_count = SVAL(req->in.vwv, VWV(3));
param_ofs = SVAL(req->in.vwv, VWV(4));
@@ -355,7 +355,8 @@ struct smbcli_request *smb_raw_trans_send_backend(struct smbcli_tree *tree,
SSVAL(req->out.vwv,VWV(1),parms->in.data.length);
SSVAL(req->out.vwv,VWV(2),parms->in.max_param);
SSVAL(req->out.vwv,VWV(3),parms->in.max_data);
- SSVAL(req->out.vwv,VWV(4),parms->in.max_setup);
+ SCVAL(req->out.vwv,VWV(4),parms->in.max_setup);
+ SCVAL(req->out.vwv,VWV(4)+1,0); /* reserved */
SSVAL(req->out.vwv,VWV(5),parms->in.flags);
SIVAL(req->out.vwv,VWV(6),parms->in.timeout);
SSVAL(req->out.vwv,VWV(8),0); /* reserved */
@@ -363,7 +364,8 @@ struct smbcli_request *smb_raw_trans_send_backend(struct smbcli_tree *tree,
SSVAL(req->out.vwv,VWV(10),params_ofs);
SSVAL(req->out.vwv,VWV(11),data_chunk.length);
SSVAL(req->out.vwv,VWV(12),data_ofs);
- SSVAL(req->out.vwv,VWV(13),parms->in.setup_count);
+ SCVAL(req->out.vwv,VWV(13),parms->in.setup_count);
+ SCVAL(req->out.vwv,VWV(13)+1,0); /* reserved */
for (i=0;i<parms->in.setup_count;i++) {
SSVAL(req->out.vwv,VWV(14)+VWV(i),parms->in.setup[i]);
}