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:
Maxim Konovalov 2002-07-01 14:29:44 +00:00
parent 47e151dd7a
commit 3af48c420b

View file

@ -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;