From 186bc7e739bb7ea080407361397cfd1002eeee5d Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Tue, 9 Apr 2002 00:06:45 +0000 Subject: [PATCH] Bugzilla bug 136251: the assertion "xferred <= op->nbytes_to_send" should not be applied when sendfilev() fails with a real error. git-svn-id: svn://10.0.0.236/trunk@118499 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/pr/src/pthreads/ptio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/nsprpub/pr/src/pthreads/ptio.c b/mozilla/nsprpub/pr/src/pthreads/ptio.c index c4a7a53aeec..4c6c1e610c7 100644 --- a/mozilla/nsprpub/pr/src/pthreads/ptio.c +++ b/mozilla/nsprpub/pr/src/pthreads/ptio.c @@ -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) {