Bugzilla bug 136251: the assertion "xferred <= op->nbytes_to_send" should

not be applied when sendfilev() fails with a real error.
This commit is contained in:
wtc%netscape.com 2002-04-09 00:06:45 +00:00
Родитель e3d49c54d9
Коммит 2c911fb2cc
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1060,9 +1060,8 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
ssize_t count;
count = SOLARIS_SENDFILEV(op->arg1.osfd, vec, op->arg3.amount, &xferred);
PR_ASSERT((count == -1) || (count == xferred));
PR_ASSERT(xferred <= op->nbytes_to_send);
op->syserrno = errno;
PR_ASSERT((count == -1) || (count == xferred));
if (count == -1) {
if (op->syserrno != EWOULDBLOCK && op->syserrno != EAGAIN
@ -1072,6 +1071,7 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
}
count = xferred;
}
PR_ASSERT(count <= op->nbytes_to_send);
op->result.code += count;
if (count < op->nbytes_to_send) {