httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From orlikow...@apache.org
Subject cvs commit: httpd-proxy/module-2.0 proxy_http.c
Date Fri, 06 Apr 2001 01:59:27 GMT
orlikowski    01/04/05 18:59:27

  Modified:    module-2.0 proxy_http.c
  Log:
  More pool allocation errors. The apr_sockaddr_t structures connect_addr and
  uri_addr were getting allocated out of the wrong pool (one of the request pools)
  when they were expected to stick around for the life of the socket.
  Further, the default pool to be used should have been the connection pool in the
  request_rec.
  
  Revision  Changes    Path
  1.42      +3 -3      httpd-proxy/module-2.0/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- proxy_http.c	2001/04/05 18:53:04	1.41
  +++ proxy_http.c	2001/04/06 01:59:26	1.42
  @@ -180,7 +180,7 @@
   		       const char *proxyname, int proxyport)
   {
       request_rec *rp;
  -    apr_pool_t *p = r->pool;
  +    apr_pool_t *p = r->connection->pool;
       const char *connectname;
       int connectport = 0;
       apr_sockaddr_t *uri_addr;
  @@ -220,13 +220,13 @@
   		 "proxy: HTTP connecting %s to %s:%d", url, uri.hostname, uri.port);
   
       /* do a DNS lookup for the destination host */
  -    err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port, 0, p);
  +    err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port, 0, r->server->process->pconf);
   
       /* are we connecting directly, or via a proxy? */
       if (proxyname) {
   	connectname = proxyname;
   	connectport = proxyport;
  -        err = apr_sockaddr_info_get(&connect_addr, proxyname, APR_UNSPEC, proxyport,
0, p);
  +        err = apr_sockaddr_info_get(&connect_addr, proxyname, APR_UNSPEC, proxyport,
0, r->server->process->pconf);
       }
       else {
   	connectname = uri.hostname;
  
  
  

Mime
View raw message