tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r749506 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml
Date Tue, 03 Mar 2009 02:09:27 GMT
Author: rjung
Date: Tue Mar  3 02:09:27 2009
New Revision: 749506

URL: http://svn.apache.org/viewvc?rev=749506&view=rev
Log:
In status worker, when doing Show - Edit - Show
you always end up with a single lb member show,
even when started from an all members lb show.
Like we use "from" to save the previous cmd,
we now also use "psw" to save and restore the
previously used sub worker.

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_status.c
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?rev=749506&r1=749505&r2=749506&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Mar  3 02:09:27 2009
@@ -60,6 +60,7 @@
 #define JK_STATUS_ARG_REFRESH              "re"
 #define JK_STATUS_ARG_WORKER               "w"
 #define JK_STATUS_ARG_SUB_WORKER           "sw"
+#define JK_STATUS_ARG_PREV_SUB_WORKER      "psw"
 #define JK_STATUS_ARG_ATTRIBUTE            "att"
 #define JK_STATUS_ARG_MULT_VALUE_BASE      "val"
 #define JK_STATUS_ARG_OPTIONS              "opt"
@@ -1036,6 +1037,8 @@
     int sz;
     int started = 0;
     int from;
+    int restore_sub_worker = JK_FALSE;
+    int save_sub_worker = JK_FALSE;
     int prev;
     unsigned int opt = 0;
     const char *arg;
@@ -1048,11 +1051,15 @@
     from = status_cmd_int(arg);
     status_get_string(p, JK_STATUS_ARG_CMD, NULL, &arg, l);
     prev = status_cmd_int(arg);
+    if (cmd == JK_STATUS_CMD_SHOW && prev == JK_STATUS_CMD_EDIT) {
+        restore_sub_worker = JK_TRUE;
+    }
     if (cmd == JK_STATUS_CMD_UNKNOWN) {
         if (prev == JK_STATUS_CMD_UPDATE ||
             prev == JK_STATUS_CMD_RESET ||
             prev == JK_STATUS_CMD_RECOVER) {
             cmd = from;
+            restore_sub_worker = JK_TRUE;
         }
     }
     if (cmd != JK_STATUS_CMD_UNKNOWN) {
@@ -1063,6 +1070,7 @@
             cmd == JK_STATUS_CMD_RECOVER) {
             jk_printf(s, "%s%s=%s", "&",
                       JK_STATUS_ARG_FROM, status_cmd_text(prev));
+            save_sub_worker = JK_TRUE;
         }
         started=1;
     }
@@ -1103,7 +1111,24 @@
         if (!strcmp(k, JK_STATUS_ARG_WORKER) && worker) {
             continue;
         }
-        if (!strcmp(k, JK_STATUS_ARG_SUB_WORKER) && (sub_worker || cmd == JK_STATUS_CMD_LIST))
{
+        if (!strcmp(k, JK_STATUS_ARG_SUB_WORKER)) {
+            if (save_sub_worker == JK_TRUE) {
+                jk_printf(s, "%s%s=%s", started ? "&" : "?",
+                          JK_STATUS_ARG_PREV_SUB_WORKER, v);
+                started=1;
+                continue;
+            }
+            else if (sub_worker || cmd == JK_STATUS_CMD_LIST) {
+                continue;
+            }
+            else if (restore_sub_worker == JK_TRUE) {
+                continue;
+            }
+        }
+        if (!strcmp(k, JK_STATUS_ARG_PREV_SUB_WORKER) && restore_sub_worker == JK_TRUE
&& cmd != JK_STATUS_CMD_LIST) {
+            jk_printf(s, "%s%s=%s", started ? "&" : "?",
+                      JK_STATUS_ARG_SUB_WORKER, v);
+            started=1;
             continue;
         }
         if (!strcmp(k, JK_STATUS_ARG_ATTRIBUTE) && attribute) {

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=749506&r1=749505&r2=749506&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Mar  3 02:09:27 2009
@@ -44,6 +44,10 @@
   <subsection name="Native">
     <changelog>
       <fix>
+        Status: Show - Edit - Show always ends in single lb member show,
+        even when started from all members lb show.
+      </fix>
+      <fix>
         Status: Wildcards in sub worker names were broken for update actions. (rjung)
       </fix>
       <update>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message