mturk       2004/08/04 08:13:35

  Modified:    ajp/proxy proxy_util.c
  Log:
  Add init_conn_worker for creating apr_reslist that maintains connection
  pool. For prefork mpm's use the single connection container.
  
  Revision  Changes    Path
  1.8       +25 -0     jakarta-tomcat-connectors/ajp/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- proxy_util.c      4 Aug 2004 14:50:13 -0000       1.7
  +++ proxy_util.c      4 Aug 2004 15:13:35 -0000       1.8
  @@ -1355,6 +1355,31 @@
       return APR_SUCCESS;
   }
   
  +static apr_status_t init_conn_worker(proxy_worker *worker, server_rec *s)
  +{
  +    apr_status_t rv;
  +#if APR_HAS_THREADS
  +    if (worker->hmax) {
  +        rv = apr_reslist_create(&(worker->cp->res),
  +                                worker->min, worker->smax,
  +                                worker->hmax, worker->ttl,
  +                                connection_constructor, connection_destructor,
  +                                s, worker->cp->pool);
  +    }
  +    else
  +#endif
  +    {
  +        worker->cp->conn = apr_pcalloc(worker->cp->pool, sizeof(proxy_conn));
  +        /* register the pool cleanup */
  +        apr_pool_cleanup_register(worker->cp->pool, (void *)worker->cp->conn,
  +                                  proxy_conn_cleanup, apr_pool_cleanup_null);      
  +
  +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
  +                     "proxy: socket is created");
  +        rv = APR_SUCCESS;
  +    }
  +    return rv;
  +}
   
   PROXY_DECLARE(apr_status_t)
   ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to