mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Move 'byte_count' calculation just before 'recvurg' check. It is a global
variable and used in myoob(). PR: bin/38928 Submitted by: Oliver Fromme <olli@secnetix.de> MFC after: 1 month
This commit is contained in:
parent
47e151dd7a
commit
3af48c420b
1 changed files with 5 additions and 1 deletions
|
|
@ -1832,9 +1832,13 @@ send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int isreg)
|
|||
while (err != -1 && filesize > 0) {
|
||||
err = sendfile(filefd, netfd, offset, 0,
|
||||
(struct sf_hdtr *) NULL, &cnt, 0);
|
||||
/*
|
||||
* Calculate byte_count before OOB processing.
|
||||
* It can be used in myoob() later.
|
||||
*/
|
||||
byte_count += cnt;
|
||||
if (recvurg)
|
||||
goto got_oob;
|
||||
byte_count += cnt;
|
||||
offset += cnt;
|
||||
filesize -= cnt;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue