Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85332E5B2 for ; Fri, 4 Jan 2013 15:10:49 +0000 (UTC) Received: (qmail 96379 invoked by uid 500); 4 Jan 2013 15:10:49 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 96088 invoked by uid 500); 4 Jan 2013 15:10:45 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 96017 invoked by uid 99); 4 Jan 2013 15:10:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2013 15:10:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2013 15:10:42 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E7AD923889D7; Fri, 4 Jan 2013 15:10:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1428916 - in /httpd/httpd/trunk: docs/log-message-tags/next-number modules/proxy/proxy_util.c Date: Fri, 04 Jan 2013 15:10:21 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130104151021.E7AD923889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Fri Jan 4 15:10:21 2013 New Revision: 1428916 URL: http://svn.apache.org/viewvc?rev=1428916&view=rev Log: non-existance of byrequests is not an immediate error Modified: httpd/httpd/trunk/docs/log-message-tags/next-number httpd/httpd/trunk/modules/proxy/proxy_util.c Modified: httpd/httpd/trunk/docs/log-message-tags/next-number URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1428916&r1=1428915&r2=1428916&view=diff ============================================================================== --- httpd/httpd/trunk/docs/log-message-tags/next-number (original) +++ httpd/httpd/trunk/docs/log-message-tags/next-number Fri Jan 4 15:10:21 2013 @@ -1 +1 @@ -2432 +2434 Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1428916&r1=1428915&r2=1428916&view=diff ============================================================================== --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original) +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Jan 4 15:10:21 2013 @@ -1142,13 +1142,10 @@ PROXY_DECLARE(char *) ap_proxy_define_ba memset(*balancer, 0, sizeof(proxy_balancer)); /* - * NOTE: The default method is byrequests, which we assume - * exists! + * NOTE: The default method is byrequests - if it doesn't + * exist, that's OK at this time. We check when we share and sync */ lbmethod = ap_lookup_provider(PROXY_LBMETHOD, "byrequests", "0"); - if (!lbmethod) { - return "Can't find 'byrequests' lb method"; - } (*balancer)->workers = apr_array_make(p, 5, sizeof(proxy_worker *)); (*balancer)->gmutex = NULL; @@ -1219,9 +1216,13 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sha balancer->s->index = i; /* the below should always succeed */ lbmethod = ap_lookup_provider(PROXY_LBMETHOD, balancer->s->lbpname, "0"); - if (lbmethod) + if (lbmethod) { balancer->lbmethod = lbmethod; - + } else { + ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(02432) + "Cannot find LB Method: %s", balancer->s->lbpname); + return APR_EINVAL; + } if (*balancer->s->nonce == PROXY_UNSET_NONCE) { char nonce[APR_UUID_FORMATTED_LENGTH + 1]; apr_uuid_t uuid; @@ -2717,7 +2718,12 @@ PROXY_DECLARE(apr_status_t) ap_proxy_syn lbmethod = ap_lookup_provider(PROXY_LBMETHOD, b->s->lbpname, "0"); if (lbmethod) { b->lbmethod = lbmethod; + } else { + ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(02433) + "Cannot find LB Method: %s", b->s->lbpname); + return APR_EINVAL; } + /* worker sync */ /*