From 5730272690b5f4d854a4c7e8b0d68040b159d6aa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 7 Aug 2012 12:55:28 +0200 Subject: s3:smb2_server: make use of SMBD_SMB2_OUT_*_IOV smbd_smb2_request_reply() metze --- source3/smbd/smb2_server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd') 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; -- cgit