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

  Modified:    modules/proxy mod_proxy.c mod_proxy.h
  Log:
  Added timeout_set for worker. Each worker can have a different timeout
  the ProxyTimout sets. Also changed proxy_conf's timeout_set to int.
  
  Use timeout_set for worker inherited from ProxyTimeout but overridable
  using timout=xxx
  
  Submitted by: mturk
  
  Revision  Changes    Path
  1.120     +9 -2      httpd-2.0/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- mod_proxy.c	11 Aug 2004 22:30:06 -0000	1.119
  +++ mod_proxy.c	11 Aug 2004 22:31:46 -0000	1.120
  @@ -121,6 +121,13 @@
           worker->acquire = apr_time_make(0, ival * 1000);
           worker->acquire_set = 1;
        }
  +    else if (!strcasecmp(key, "timeout")) {
  +        ival = atoi(val);
  +        if (ival < 1)
  +            return "timeout must be at least one second";
  +        worker->timeout = apr_time_from_sec(ival);
  +        worker->timeout_set = 1;
  +     }
       else {
           return "unknown parameter";
       }
  @@ -1231,9 +1238,9 @@
           if ((err = ap_proxy_add_worker(&worker, cmd->pool, conf, name)) != NULL)
               return apr_pstrcat(cmd->temp_pool, "BalancerMember: ", err, NULL); 
       }
  -    if (conf->timeout_set)
  +    if ((worker->timeout_set = conf->timeout_set))
           worker->timeout = conf->timeout;
  -
  +    
       arr = apr_table_elts(params);
       elts = (const apr_table_entry_t *)arr->elts;
       for (i = 0; i < arr->nelts; i++) {
  
  
  
  1.107     +5 -1      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.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- mod_proxy.h	11 Aug 2004 22:30:06 -0000	1.106
  +++ mod_proxy.h	11 Aug 2004 22:31:46 -0000	1.107
  @@ -155,7 +155,7 @@
       int preserve_host;
       int preserve_host_set;
       apr_interval_time_t timeout;
  -    apr_interval_time_t timeout_set;
  +    int timeout_set;
       enum {
         bad_error,
         bad_ignore,
  @@ -228,6 +228,7 @@
       apr_interval_time_t ttl;    /* maximum amount of time in seconds a connection
                                    * may be available while exceeding the soft limit */
       apr_interval_time_t timeout; /* connection timeout */
  +    int timeout_set;
       apr_interval_time_t acquire; /* acquire timeout when the maximum number of connections
is exceeded */
       char                acquire_set;
       proxy_conn_pool *cp;        /* Connection pool to use */
  @@ -352,6 +353,9 @@
   PROXY_DECLARE(apr_status_t) ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
proxy_server_conf *conf, proxy_worker *worker, proxy_conn_rec *conn,
                                                             apr_pool_t *ppool, apr_uri_t
*uri, char **url, const char *proxyname, apr_port_t proxyport,
                                                             char *server_portstr, int server_portstr_size);
  +PROXY_DECLARE(apr_status_t) ap_proxy_destroy_connection(proxy_conn_rec *conn);
  +PROXY_DECLARE(apr_status_t) ap_proxy_close_connection(proxy_conn_rec *conn);
  +
   
   /* For proxy_util */
   extern module PROXY_DECLARE_DATA proxy_module;
  
  
  

Mime
View raw message