1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:smbd: add smbd_smb2_send_queue.sendfile_body_size

The following patches require the size of the full sendfile() pdu.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
This commit is contained in:
Stefan Metzmacher 2020-06-05 20:14:10 +02:00
parent 61b9418784
commit 37c52c2d49
2 changed files with 2 additions and 0 deletions

View File

@ -682,6 +682,7 @@ struct smbd_smb2_send_queue {
struct smbd_smb2_send_queue *prev, *next;
DATA_BLOB *sendfile_header;
uint32_t sendfile_body_size;
NTSTATUS *sendfile_status;
struct iovec *vector;
int count;

View File

@ -651,6 +651,7 @@ static NTSTATUS smbd_smb2_read_recv(struct tevent_req *req,
talloc_set_destructor(state, smb2_smb2_read_state_deny_destructor);
tevent_req_received(req);
state->smb2req->queue_entry.sendfile_header = &state->out_headers;
state->smb2req->queue_entry.sendfile_body_size = state->in_length;
talloc_set_destructor(state, smb2_sendfile_send_data);
} else {
tevent_req_received(req);