httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_util.c
Date Wed, 11 Aug 2004 22:15:23 GMT
wrowe       2004/08/11 15:15:23

  Modified:    modules/proxy proxy_util.c
  Log:
  Use the worker pool for creating proxy_conn_poll to suppress it's
  destruction when cleaning worker.
  
  Submitted by: mturk
  
  Revision  Changes    Path
  1.117     +15 -3     httpd-2.0/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- proxy_util.c	11 Aug 2004 22:14:49 -0000	1.116
  +++ proxy_util.c	11 Aug 2004 22:15:23 -0000	1.117
  @@ -1081,9 +1081,16 @@
       apr_pool_t *pool;
       proxy_conn_pool *cp;
       
  -    /* Create a connection pool's subpool */
  +    /* Create a connection pool's subpool. 
  +     * This pool is used for connection recycling.
  +     * Once the worker is added it is never removed but
  +     * it can be disabled.
  +     */
       apr_pool_create(&pool, p);
  -    cp = (proxy_conn_pool *)apr_pcalloc(pool, sizeof(proxy_conn_pool));
  +    /* Alloc from the same pool as worker.
  +     * proxy_conn_pool is permanently attached to the worker. 
  +     */
  +    cp = (proxy_conn_pool *)apr_pcalloc(p, sizeof(proxy_conn_pool));
       cp->pool = pool;
   #if APR_HAS_THREADS
       {
  @@ -1372,7 +1379,12 @@
   #endif
       {
           worker->cp->conn = apr_pcalloc(worker->cp->pool, sizeof(proxy_conn));
  -        /* register the pool cleanup */
  +        /* register the pool cleanup.
  +         * The cleanup is registered on conn_pool pool, so that
  +         * the same mechanism (apr_pool_cleanup) can be used
  +         * for both nonthreaded and threaded servers when closing
  +         * the entire worker.
  +         */
           apr_pool_cleanup_register(worker->cp->pool, (void *)worker->cp->conn,
                                     proxy_conn_cleanup, apr_pool_cleanup_null);      
   
  
  
  

Mime
View raw message