httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject Re: cvs commit: apache-2.0/src/main http_core.c
Date Thu, 12 Oct 2000 02:09:12 GMT


WHOO HOO!  Thanks Jeff.  I just hit this bug, but I haven't had a chance
to look for it yet.  Now I don't have to.  :-)

Ryan

On 12 Oct 2000 trawick@locus.apache.org wrote:

> trawick     00/10/11 18:50:52
> 
>   Modified:    src/main http_core.c
>   Log:
>   Avoid swap-til-you-drop by cutting off a loop once the client closes.
>   
>   Revision  Changes    Path
>   1.162     +15 -5     apache-2.0/src/main/http_core.c
>   
>   Index: http_core.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
>   retrieving revision 1.161
>   retrieving revision 1.162
>   diff -u -r1.161 -r1.162
>   --- http_core.c	2000/10/11 18:32:17	1.161
>   +++ http_core.c	2000/10/12 01:50:51	1.162
>   @@ -3307,11 +3307,21 @@
>    {
>        apr_socket_t *csock = NULL;
>        ap_bucket *e;
>   -
>   -    ap_bpop_socket(&csock, f->c->client);
>   -    e = ap_bucket_create_socket(csock);
>   -    AP_BRIGADE_INSERT_TAIL(b, e);
>   -    return APR_SUCCESS;
>   +    
>   +    if (!f->ctx) {    /* If we haven't passed up the socket yet... */
>   +        f->ctx = (void *)1;
>   +        ap_bpop_socket(&csock, f->c->client);
>   +        e = ap_bucket_create_socket(csock);
>   +        AP_BRIGADE_INSERT_TAIL(b, e);
>   +        return APR_SUCCESS;
>   +    }
>   +    else {            
>   +        /* Either some code lost track of the socket
>   +         * bucket or we already found out that the
>   +         * client closed.
>   +         */
>   +        return APR_EOF;
>   +    }
>    }
>    
>    /* Default filter.  This filter should almost always be used.  Its only job
>   
>   
>   
> 


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


Mime
View raw message