summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-05 14:55:29 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-05 20:55:34 +0200
commit21742c3693f85222fdf7573fa194a1ed17b7e677 (patch)
treea4d8c285ce486ca78f9fb6754635de3268d3dccb /source3
parent7ee54cd9c45c30d1a384ffcdeea45b2a7898b117 (diff)
downloadsamba-21742c3693f85222fdf7573fa194a1ed17b7e677.tar.gz
samba-21742c3693f85222fdf7573fa194a1ed17b7e677.tar.bz2
samba-21742c3693f85222fdf7573fa194a1ed17b7e677.zip
s3:smb2_break: make use of SMBD_SMB2_IN_BODY_PTR()
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_break.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c
index 77f4709620..8143b8b976 100644
--- a/source3/smbd/smb2_break.c
+++ b/source3/smbd/smb2_break.c
@@ -38,7 +38,6 @@ NTSTATUS smbd_smb2_request_process_break(struct smbd_smb2_request *req)
{
NTSTATUS status;
const uint8_t *inbody;
- int i = req->current_idx;
uint8_t in_oplock_level;
uint64_t in_file_id_persistent;
uint64_t in_file_id_volatile;
@@ -49,7 +48,7 @@ NTSTATUS smbd_smb2_request_process_break(struct smbd_smb2_request *req)
if (!NT_STATUS_IS_OK(status)) {
return smbd_smb2_request_error(req, status);
}
- inbody = (const uint8_t *)req->in.vector[i+1].iov_base;
+ inbody = SMBD_SMB2_IN_BODY_PTR(req);
in_oplock_level = CVAL(inbody, 0x02);
@@ -83,7 +82,6 @@ static void smbd_smb2_request_oplock_break_done(struct tevent_req *subreq)
struct smbd_smb2_request *req = tevent_req_callback_data(subreq,
struct smbd_smb2_request);
const uint8_t *inbody;
- int i = req->current_idx;
uint64_t in_file_id_persistent;
uint64_t in_file_id_volatile;
uint8_t out_oplock_level = 0;
@@ -103,7 +101,7 @@ static void smbd_smb2_request_oplock_break_done(struct tevent_req *subreq)
return;
}
- inbody = (const uint8_t *)req->in.vector[i+1].iov_base;
+ inbody = SMBD_SMB2_IN_BODY_PTR(req);
in_file_id_persistent = BVAL(inbody, 0x08);
in_file_id_volatile = BVAL(inbody, 0x10);