You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 2000/11/21 03:34:10 UTC
Re: cvs commit: apache-2.0/src/modules/proxy proxy_util.c
On Mon, Nov 20, 2000 at 06:10:21PM -0000, chuck@locus.apache.org wrote:
> chuck 00/11/20 10:10:21
>
> Modified: src/modules/proxy proxy_util.c
> Log:
> Restore Ryan's original intent in ap_proxy_doconnect() return value check
>
> Revision Changes Path
> 1.31 +1 -2 apache-2.0/src/modules/proxy/proxy_util.c
>
> Index: proxy_util.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_util.c,v
> retrieving revision 1.30
> retrieving revision 1.31
> diff -u -r1.30 -r1.31
> --- proxy_util.c 2000/11/18 03:17:21 1.30
> +++ proxy_util.c 2000/11/20 18:10:19 1.31
> @@ -1114,8 +1114,7 @@
> if (rv == APR_SUCCESS) {
> rv = apr_connect(sock, destsa);
> }
> - if (rv != APR_SUCCESS)
> - {
> + else if (rv != APR_SUCCESS) {
> ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
> "proxy connect to %s port %d failed", host, port);
> }
The above change looks wrong.
If the previous operation was a success, then it tries an apr_connect(). If
the previous op, OR the apr_connect() fails, then the error is logged.
In your change, only the failure from apr_getaddrinfo() gets logged. Nothing
from apr_connect().
Cheers,
-g
--
Greg Stein, http://www.lyra.org/