diff options
author | Volker Lendecke <vl@samba.org> | 2012-03-03 00:33:15 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-03-10 15:34:12 +0100 |
commit | 572bc64b594d0d30cb64976579a55e74f01800d2 (patch) | |
tree | 780ec50404e7dd6f3dbe27ac3896e2ee4928bfde /source3 | |
parent | 12068d4aaca0579b58bbb121df4d1e947f8ea032 (diff) | |
download | samba-572bc64b594d0d30cb64976579a55e74f01800d2.tar.gz samba-572bc64b594d0d30cb64976579a55e74f01800d2.tar.bz2 samba-572bc64b594d0d30cb64976579a55e74f01800d2.zip |
s3: Remove "req_wct_ofs()"
This is fixed up in construct_reply_chain
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/pipes.c | 2 | ||||
-rw-r--r-- | source3/smbd/process.c | 19 | ||||
-rw-r--r-- | source3/smbd/proto.h | 1 | ||||
-rw-r--r-- | source3/smbd/reply.c | 2 |
4 files changed, 2 insertions, 22 deletions
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c index b39c0f0e59..c21b635bfb 100644 --- a/source3/smbd/pipes.c +++ b/source3/smbd/pipes.c @@ -479,7 +479,7 @@ static void pipe_read_andx_done(struct tevent_req *subreq) SSVAL(req->outbuf,smb_vwv5,nread); SSVAL(req->outbuf,smb_vwv6, - req_wct_ofs(req) + (smb_wct - 4) /* offset from smb header to wct */ + 1 /* the wct field */ + 12 * sizeof(uint16_t) /* vwv */ + 2); /* the buflen field */ diff --git a/source3/smbd/process.c b/source3/smbd/process.c index c163212bc0..c3304c7114 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1833,25 +1833,6 @@ void construct_reply_common_req(struct smb_request *req, char *outbuf) construct_reply_common(req, (const char *)req->inbuf, outbuf); } -/* - * How many bytes have we already accumulated up to the current wct field - * offset? - */ - -size_t req_wct_ofs(struct smb_request *req) -{ - size_t buf_size; - - if (req->chain_outbuf == NULL) { - return smb_wct - 4; - } - buf_size = talloc_get_size(req->chain_outbuf); - if ((buf_size % 4) != 0) { - buf_size += (4 - (buf_size % 4)); - } - return buf_size - 4; -} - /** * @brief Find the smb_cmd offset of the last command pushed * @param[in] buf The buffer we're building up diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index f4aa06b061..a467202ff4 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -784,7 +784,6 @@ const char *smb_fn_name(int type); void add_to_common_flags2(uint32 v); void remove_from_common_flags2(uint32 v); void construct_reply_common_req(struct smb_request *req, char *outbuf); -size_t req_wct_ofs(struct smb_request *req); bool smb1_is_chain(const uint8_t *buf); bool smb1_walk_chain(const uint8_t *buf, bool (*fn)(uint8_t cmd, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 8b94396578..6e4bcab774 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3508,7 +3508,7 @@ static int setup_readX_header(struct smb_request *req, char *outbuf, SSVAL(outbuf,smb_vwv2,0xFFFF); /* Remaining - must be -1. */ SSVAL(outbuf,smb_vwv5,smb_maxcnt); SSVAL(outbuf,smb_vwv6, - req_wct_ofs(req) + (smb_wct - 4) /* offset from smb header to wct */ + 1 /* the wct field */ + 12 * sizeof(uint16_t) /* vwv */ + 2); /* the buflen field */ |