mturk       2004/08/09 03:00:24

  Modified:    ajp/proxy proxy_util.c
  Log:
  Set initial lbstatus to calculated lbfactor.
  
  Revision  Changes    Path
  1.21      +6 -11     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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- proxy_util.c      6 Aug 2004 14:05:45 -0000       1.20
  +++ proxy_util.c      9 Aug 2004 10:00:23 -0000       1.21
  @@ -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 */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to