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

Add function smbd_smb2_unread_bytes().

Returns number of bytes left to read for recvfile. Will be
used in SMB_2_WRITE_FILE code path.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
This commit is contained in:
Jeremy Allison 2013-03-19 12:24:17 -07:00
parent ec9fc986da
commit a36d7633bd
2 changed files with 13 additions and 0 deletions

View File

@ -247,6 +247,7 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
uint32_t defer_time);
struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req);
size_t smbd_smb2_unread_bytes(struct smbd_smb2_request *req);
void remove_smb2_chained_fsp(files_struct *fsp);
NTSTATUS smbd_smb2_request_verify_creditcharge(struct smbd_smb2_request *req,

View File

@ -58,6 +58,18 @@ struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req)
return smbreq;
}
/*********************************************************
Are there unread bytes for recvfile ?
*********************************************************/
size_t smbd_smb2_unread_bytes(struct smbd_smb2_request *req)
{
if (req->smb1req) {
return req->smb1req->unread_bytes;
}
return 0;
}
/*********************************************************
Called from file_free() to remove any chained fsp pointers.
*********************************************************/