apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: cvs commit: apr/network_io/unix sendrecv.c
Date Fri, 04 May 2001 00:11:02 GMT

> >   Index: sendfile.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/test/sendfile.c,v
> >   retrieving revision 1.12
> >   retrieving revision 1.13
> >   diff -u -r1.12 -r1.13
> >   --- sendfile.c	2001/03/31 22:37:13	1.12
> >   +++ sendfile.c	2001/05/03 22:37:58	1.13
> >   @@ -373,6 +373,7 @@
> >                printf("apr_sendfile()->%d, sent %ld bytes\n", rv, (long)tmplen);
> >                if (rv) {
> >                    if (APR_STATUS_IS_EAGAIN(rv)) {
> >   +                    assert(tmplen == 0);
> >                        nsocks = 1;
> >                        tmprv = apr_poll(pfd, &nsocks, -1);
> >                        assert(!tmprv);
>
> No assert should ever be present in server code, period.  I don't care if
> the only way it could be triggered is by a cosmic ray hittng a memory cell
> at just the wrong moment in time, it doesn't belong in the server code.
>
> Either check the error condition or be prepared to ignore it.

We have asserts throughout the server these days.  Do we want to remove
them all?

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message