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_balancer.c
Date Thu, 16 Sep 2004 14:12:36 GMT
mturk       2004/09/16 07:12:36

  Modified:    modules/proxy proxy_balancer.c
  Log:
  Add failover attempts management to balancer-manager.
  
  Revision  Changes    Path
  1.23      +12 -2     httpd-2.0/modules/proxy/proxy_balancer.c
  
  Index: proxy_balancer.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_balancer.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- proxy_balancer.c	15 Sep 2004 18:27:08 -0000	1.22
  +++ proxy_balancer.c	16 Sep 2004 14:12:36 -0000	1.23
  @@ -618,6 +618,12 @@
               if (ival >= 0)
                   bsel->timeout = apr_time_from_sec(ival);
           }
  +        if ((val = apr_table_get(params, "fa"))) {
  +            int ival = atoi(val);
  +            if (ival >= 0)
  +                bsel->max_attempts = ival;
  +            bsel->max_attempts_set = 1;
  +        }
       }
       if (wsel) {
           const char *val;
  @@ -696,11 +702,12 @@
                         "\">", NULL); 
               ap_rvputs(r, balancer->name, "</a></h3>\n\n", NULL);
               ap_rputs("\n\n<table border=\"0\"><tr>"
  -                "<th>StickySesion</th><th>Timeout</th>"
  +                "<th>StickySesion</th><th>Timeout</th><th>FailoverAttempts</th>"
                   "</tr>\n<tr>", r);                
               ap_rvputs(r, "<td>", balancer->sticky, NULL);
  -            ap_rprintf(r, "</td><td>%" APR_TIME_T_FMT "</td>\n",
  +            ap_rprintf(r, "</td><td>%" APR_TIME_T_FMT "</td>",
                   apr_time_sec(balancer->timeout));
  +            ap_rprintf(r, "<td>%d</td>\n", balancer->max_attempts);
               ap_rputs("</table>\n", r);
               ap_rputs("\n\n<table border=\"0\"><tr>"
                   "<th>Scheme</th><th>Host</th>"
  @@ -774,6 +781,9 @@
               ap_rputs("></td><tr>\n<tr><td>Timeout:</td><td><input
name=\"tm\" type=text ", r);
               ap_rprintf(r, "value=\"%" APR_TIME_T_FMT "\"></td></tr>\n",
                          apr_time_sec(bsel->timeout));
  +            ap_rputs("<tr><td>Failover Attempts:</td><td><input
name=\"fa\" type=text ", r);
  +            ap_rprintf(r, "value=\"%d\"></td></tr>\n",
  +                       bsel->max_attempts);
               ap_rputs("<tr><td colspan=2><input type=submit value=\"Submit\"></td></tr>\n",
r);
               ap_rvputs(r, "</table>\n<input type=hidden name=\"b\" ", NULL);
               ap_rvputs(r, "value=\"", bsel->name + sizeof("balancer://") - 1,
  
  
  

Mime
View raw message