httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r232314 - /httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Date Fri, 12 Aug 2005 15:31:06 GMT
Author: jim
Date: Fri Aug 12 08:31:03 2005
New Revision: 232314

URL: http://svn.apache.org/viewcvs?rev=232314&view=rev
Log:
When using the LB Balancer manager, if you disabled
a member, then clicked on another member and/or
itself again, the member would be re-enabled. This
was due to the form being "submitted" and
'dw' being null (observed with Safari). Anyway,
moving to a radio makes it explicit.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=232314&r1=232313&r2=232314&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Fri Aug 12 08:31:03 2005
@@ -691,10 +691,12 @@
             else
                 *wsel->s->redirect = '\0';
         }
-        if ((val = apr_table_get(params, "dw")))
-            wsel->s->status |= PROXY_WORKER_DISABLED;
-        else
-            wsel->s->status &= ~PROXY_WORKER_DISABLED;
+        if ((val = apr_table_get(params, "dw"))) {
+            if (!strcasecmp(val, "Disable"))
+                wsel->s->status |= PROXY_WORKER_DISABLED;
+            else if (!strcasecmp(val, "Enable"))
+                wsel->s->status &= ~PROXY_WORKER_DISABLED;
+        }
 
     }
     if (apr_table_get(params, "xml")) {
@@ -801,8 +803,11 @@
             ap_rputs("<tr><td>Route Redirect:</td><td><input name=\"rr\"
type=text ", r);
             ap_rvputs(r, "value=\"", wsel->redirect, NULL); 
             ap_rputs("\"></td><tr>\n", r);            
-            ap_rputs("<tr><td>Disabled:</td><td><input name=\"dw\"
type=checkbox", r);
+            ap_rputs("<tr><td>Status:</td><td>Disabled: <input
name=\"dw\" value=\"Disable\" type=radio", r);
             if (wsel->s->status & PROXY_WORKER_DISABLED)
+                ap_rputs(" checked", r);
+            ap_rputs("> | Enabled: <input name=\"dw\" value=\"Enable\" type=radio",
r);
+            if (!(wsel->s->status & PROXY_WORKER_DISABLED))
                 ap_rputs(" checked", r);
             ap_rputs("></td><tr>\n", r);            
             ap_rputs("<tr><td colspan=2><input type=submit value=\"Submit\"></td></tr>\n",
r);



Mime
View raw message