]> granicus.if.org Git - apache/commitdiff
Obtain balancer using API.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 11 Aug 2004 21:26:03 +0000 (21:26 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 11 Aug 2004 21:26:03 +0000 (21:26 +0000)
Submitted by: mturk

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104568 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.c

index a406299ad9f42708f336dfa335869de892772e6e..5874c0dbeb497f2a0917d9732dc55b74c7d05992 100644 (file)
@@ -1032,7 +1032,7 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
     server_rec *s = cmd->server;
     proxy_server_conf *conf =
     ap_get_module_config(s->module_config, &proxy_module);
-    struct proxy_balancer *balancer, *balancers;
+    struct proxy_balancer *balancer;
     proxy_worker *worker;
     char *path = NULL;
     char *name = NULL;
@@ -1092,14 +1092,7 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
         }
     }
     /* Try to find the balancer */
-    balancers = (struct proxy_balancer *)conf->balancers->elts;
-    for (i = 0; i < conf->balancers->nelts; i++) {
-        if (!strcmp(name, balancers[i].name)) {
-            balancer = &balancers[i];
-            break;
-        }
-    }
-
+    balancer = ap_proxy_get_balancer(cmd->temp_pool, conf, name); 
     if (!balancer) {
         apr_status_t rc = 0;
 #if DEBUGGING