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 mod_proxy.h proxy_util.c
Date Wed, 11 Aug 2004 22:56:52 GMT
wrowe       2004/08/11 15:56:52

  Modified:    modules/proxy mod_proxy.h proxy_util.c
  Log:
  Add route and redirect to worker so they can be set trough configuration.
  Add worker status flag definitions.
  
  Submitted by: mturk
  
  Revision  Changes    Path
  1.117     +11 -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.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- mod_proxy.h	11 Aug 2004 22:55:00 -0000	1.116
  +++ mod_proxy.h	11 Aug 2004 22:56:51 -0000	1.117
  @@ -213,6 +213,15 @@
       proxy_conn_rec *conn;   /* Single connection for prefork mpm's */
   };
   
  +/* woker status flags */
  +#define PROXY_WORKER_INITIALIZED    0x0001
  +#define PROXY_WORKER_IN_SHUTDOWN    0x0010
  +#define PROXY_WORKER_DISABLED       0x0020
  +#define PROXY_WORKER_IN_ERROR       0x0040
  +
  +#define PROXY_WORKER_IS_USABLE(f)   (!((f)->status & 0x00F0))
  +
  +
   /* Worker configuration */
   struct proxy_worker {
       int             status;
  @@ -223,6 +232,8 @@
       const char      *name;
       const char      *scheme;    /* scheme to use ajp|http|https */
       const char      *hostname;  /* remote backend address */
  +    const char      *route;     /* balancing route */
  +    const char      *redirect;  /* temporary balancing redirection route */
       apr_port_t      port;
       int             min;        /* Desired minimum number of available connections */
       int             smax;       /* Soft maximum on the total number of connections */
  @@ -251,8 +262,6 @@
       double          lbstatus;   /* Current lbstatus */
       apr_size_t      transfered; /* Number of bytes transfered to remote */
       apr_size_t      readed;     /* Number of bytes readed from remote */
  -    const char      *route;
  -    const char      *redirect;
   } proxy_runtime_worker;
   
   struct proxy_balancer {
  
  
  
  1.129     +2 -3      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.128
  retrieving revision 1.129
  diff -u -r1.128 -r1.129
  --- proxy_util.c	11 Aug 2004 22:55:28 -0000	1.128
  +++ proxy_util.c	11 Aug 2004 22:56:51 -0000	1.129
  @@ -1450,15 +1450,14 @@
   {
       apr_status_t rv;
   
  -    if (!worker->status) {
  +    if (!(worker->status & PROXY_WORKER_INITIALIZED)) {
           if ((rv = init_conn_worker(worker, s)) != APR_SUCCESS) {
               ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
                            "proxy: %s: failed to initialize worker for (%s)",
                            proxy_function, worker->hostname);
               return DECLINED;
           }
  -        /* TODO: make worker status codes */
  -        worker->status = 1;
  +        worker->status = PROXY_WORKER_INITIALIZED;
       }
   #if APR_HAS_THREADS
       if (worker->hmax) {
  
  
  

Mime
View raw message