summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-07 12:55:28 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-07 18:32:46 +0200
commit5730272690b5f4d854a4c7e8b0d68040b159d6aa (patch)
tree0c17cc3b743d411515842f34dbd6b6fc424e5825 /source3/smbd
parent727b1d1fa867e1421cc01f4eee95f8001d315a12 (diff)
downloadsamba-5730272690b5f4d854a4c7e8b0d68040b159d6aa.tar.gz
samba-5730272690b5f4d854a4c7e8b0d68040b159d6aa.tar.bz2
samba-5730272690b5f4d854a4c7e8b0d68040b159d6aa.zip
s3:smb2_server: make use of SMBD_SMB2_OUT_*_IOV smbd_smb2_request_reply()
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index aa69705ef0..acc998bfd0 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1979,7 +1979,8 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
{
struct tevent_req *subreq;
- int i = req->current_idx;
+ struct iovec *outhdr = SMBD_SMB2_OUT_HDR_IOV(req);
+ struct iovec *outdyn = SMBD_SMB2_OUT_DYN_IOV(req);
req->subreq = NULL;
TALLOC_FREE(req->async_te);
@@ -2024,7 +2025,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
status = smb2_signing_sign_pdu(signing_key,
conn->protocol,
- &req->out.vector[i],
+ outhdr,
SMBD_SMB2_NUM_IOV_PER_REQ);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -2038,8 +2039,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
/* I am a sick, sick man... :-). Sendfile hack ... JRA. */
if (req->out.vector_count == 4 &&
- req->out.vector[3].iov_base == NULL &&
- req->out.vector[3].iov_len != 0) {
+ outdyn->iov_base == NULL && outdyn->iov_len != 0) {
/* Dynamic part is NULL. Chop it off,
We're going to send it via sendfile. */
req->out.vector_count -= 1;