httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_util.c mod_proxy.h
Date Wed, 29 Sep 2004 19:05:44 GMT
mturk       2004/09/29 12:05:44

  Modified:    modules/proxy proxy_util.c mod_proxy.h
  Log:
  Add server_rec to initialize_worker_share so that it get's
  correctly.
  
  Revision  Changes    Path
  1.160     +19 -8     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.159
  retrieving revision 1.160
  diff -u -r1.159 -r1.160
  --- proxy_util.c	28 Sep 2004 16:54:29 -0000	1.159
  +++ proxy_util.c	29 Sep 2004 19:05:44 -0000	1.160
  @@ -1364,7 +1364,8 @@
   }
   
   PROXY_DECLARE(void) ap_proxy_initialize_worker_share(proxy_server_conf *conf,
  -                                                     proxy_worker *worker)
  +                                                     proxy_worker *worker,
  +                                                     server_rec *s)
   {
   #if PROXY_HAS_SCOREBOARD
       lb_score *score = NULL;
  @@ -1376,22 +1377,35 @@
       if (ap_scoreboard_image) {
           score = ap_get_scoreboard_lb(worker->id);
       if (!score)
  -        ap_log_perror(APLOG_MARK, APLOG_ERR, 0, conf->pool,
  +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
                 "proxy: ap_get_scoreboard_lb(%d) failed for worker %s",
                 worker->id, worker->name);
       }
  +    else {
  +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
  +              "proxy: initialized scoreboard slot %d for worker %s",
  +              worker->id, worker->name);
  +    }
   #endif
  -    if (!score)
  +    if (!score) {
           score = apr_pcalloc(conf->pool, sizeof(proxy_worker_stat));
  +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
  +              "proxy: initialized plain memory for worker %s",
  +              worker->name);
  +    }
       worker->s = (proxy_worker_stat *)score;
       if (worker->route)
           strcpy(worker->s->route, worker->route);
       else
  -    *worker->s->route = '\0';
  +        *worker->s->route = '\0';
       if (worker->redirect)
           strcpy(worker->s->redirect, worker->redirect);
       else
  -    *worker->s->redirect = '\0';
  +        *worker->s->redirect = '\0';
  +    /* Set default parameters */
  +    if (!worker->retry)
  +        worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
  +
   }
   
   PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, server_rec
*s)
  @@ -1448,9 +1462,6 @@
       }
       if (rv == APR_SUCCESS)
           worker->s->status |= PROXY_WORKER_INITIALIZED;
  -    /* Set default parameters */
  -    if (!worker->retry)
  -        worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
       return rv;
   }
   
  
  
  
  1.140     +3 -2      httpd-2.0/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.h,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- mod_proxy.h	28 Sep 2004 16:54:29 -0000	1.139
  +++ mod_proxy.h	29 Sep 2004 19:05:44 -0000	1.140
  @@ -420,17 +420,18 @@
   /**
    * Initize the worker's shared data
    * @param conf   current proxy server configuration
  + * @param worker worker to initialize
    * @param s      current server record
    * @param worker worker to initialize
    */
   PROXY_DECLARE(void) ap_proxy_initialize_worker_share(proxy_server_conf *conf,
  -                                                     proxy_worker *worker);
  +                                                     proxy_worker *worker,
  +                                                     server_rec *s);
   
   
   /**
    * Initize the worker
    * @param worker worker to initialize
  - * @param p      memory pool to allocate worker from 
    * @param s      current server record
    * @return       APR_SUCCESS or error code
    */
  
  
  

Mime
View raw message