httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_util.c
Date Wed, 11 Aug 2004 22:55:28 GMT
wrowe       2004/08/11 15:55:28

  Modified:    modules/proxy proxy_util.c
  Log:
  Set initial lbstatus to calculated lbfactor.
  
  Submitted by: mturk
  
  Revision  Changes    Path
  1.128     +6 -11     httpd-2.0/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- proxy_util.c	11 Aug 2004 22:44:38 -0000	1.127
  +++ proxy_util.c	11 Aug 2004 22:55:28 -0000	1.128
  @@ -1017,24 +1017,15 @@
                                                     const char *url)
   {
       char *c, *q, *uri = apr_pstrdup(p, url);
  -    int port;
       apr_status_t rc = 0;
   
       c = strchr(uri, ':');   
       if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0')
  -       return "Bad syntax for a remote proxy server";
  +       return "Bad syntax for a balancer name";
       /* remove path from uri */
       if ((q = strchr(c + 3, '/')))
           *q = '\0';
   
  -    q = strchr(c + 3, ':');
  -    if (q != NULL) {
  -        if (sscanf(q + 1, "%u", &port) != 1 || port > 65535) {
  -            return "Bad syntax for a remote proxy server (bad port number)";
  -        }
  -    }
  -    else
  -        port = -1;
       ap_str_tolower(uri);
       *balancer = apr_array_push(conf->balancers);
       (*balancer)->name = uri;
  @@ -1189,7 +1180,10 @@
                   workers[i].lbfactor -= median;
           }
       } 
  -
  +    for (i = 0; i < balancer->workers->nelts; i++) {
  +        /* Update the status entires */
  +        workers[i].lbstatus = workers[i].lbfactor;
  +    }
   }
   
   PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker,
  @@ -1421,6 +1415,7 @@
           /* Set min to be lower then smax */
           if (worker->min > worker->smax)
               worker->min = worker->smax; 
  +        worker->cp->nfree = worker->hmax;
       }
       else {
           /* This will supress the apr_reslist creation */
  
  
  

Mime
View raw message