Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 90954 invoked from network); 4 Aug 2004 17:34:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Aug 2004 17:34:18 -0000 Received: (qmail 16063 invoked by uid 500); 4 Aug 2004 14:50:34 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 16024 invoked by uid 500); 4 Aug 2004 14:50:34 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 15939 invoked by uid 500); 4 Aug 2004 14:50:31 -0000 Received: (qmail 15936 invoked by uid 99); 4 Aug 2004 14:50:31 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Wed, 04 Aug 2004 07:50:31 -0700 Received: (qmail 20089 invoked by uid 1526); 4 Aug 2004 14:50:13 -0000 Date: 4 Aug 2004 14:50:13 -0000 Message-ID: <20040804145013.20088.qmail@minotaur.apache.org> From: mturk@apache.org To: jakarta-tomcat-connectors-cvs@apache.org Subject: cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mturk 2004/08/04 07:50:13 Modified: ajp/proxy proxy_util.c Log: Add some source comments about worker DNS lookup. Revision Changes Path 1.7 +5 -2 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.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- proxy_util.c 4 Aug 2004 14:35:39 -0000 1.6 +++ proxy_util.c 4 Aug 2004 14:50:13 -0000 1.7 @@ -1396,7 +1396,6 @@ if (proxyname) { mconf->conn_rec->hostname = apr_pstrdup(ppool, proxyname); mconf->conn_rec->port = proxyport; - /* see memory note above */ } else { mconf->conn_rec->hostname = apr_pstrdup(ppool, uri->hostname); mconf->conn_rec->port = uri->port; @@ -1405,13 +1404,17 @@ uri->fragment ? "#" : "", uri->fragment ? uri->fragment : "", NULL); } + /* Worker can have the single constant backend adress. + * The single DNS lookup is used once per worker. + * If dynamic change is needed then set the addr to NULL + * inside dynamic config to force the lookup. + */ if (!mconf->worker->cp->addr) err = apr_sockaddr_info_get(&(mconf->worker->cp->addr), mconf->conn_rec->hostname, APR_UNSPEC, mconf->conn_rec->port, 0, mconf->worker->cp->pool); - /* do a DNS lookup for the destination host */ if (err != APR_SUCCESS) { return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p, "DNS lookup failure for: ", --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org