tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r750070 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Date Wed, 04 Mar 2009 16:40:39 GMT
Author: rjung
Date: Wed Mar  4 16:40:38 2009
New Revision: 750070

URL: http://svn.apache.org/viewvc?rev=750070&view=rev
Log:
Initialize side_effect indicator properly.
Handle dynamic address changes and error returns
correctly in the non lb case.

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_status.c

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=750070&r1=750069&r2=750070&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Mar  4 16:40:38 2009
@@ -4019,6 +4019,7 @@
                        "Status worker '%s' %s lb worker '%s' sub worker '%s'",
                        w->name, "updating", lb->name, wr->name);
                 aw = (ajp_worker_t *)wr->worker->worker_private;
+                rv = 0;
                 rc = commit_member(s, p, lb, wr, aw, &rv, l);
                 if (rv & JK_STATUS_NEEDS_ADDR_PUSH) {
                     aw->addr_sequence++;
@@ -4068,11 +4069,26 @@
                        w->name, "updating", aw->name);
             if (aw->sequence != aw->s->h.sequence)
                 jk_ajp_pull(aw, JK_TRUE, l);
+            rv = 0;
             rc = commit_member(s, p, NULL, NULL, aw, &rv, l);
-            if (rv & JK_STATUS_NEEDS_PUSH) {
+            if (rv & JK_STATUS_NEEDS_ADDR_PUSH) {
+                aw->addr_sequence++;
+            }
+            if (rv & (JK_STATUS_NEEDS_PUSH | JK_STATUS_NEEDS_ADDR_PUSH)) {
                 aw->sequence++;
                 jk_ajp_push(aw, JK_TRUE, l);
             }
+            if (rc == JK_FALSE) {
+                jk_log(l, JK_LOG_ERROR,
+                       "Status worker '%s' failed updating worker '%s' (at least partially).",
+                       w->name, aw->name);
+                if (!strncmp("OK", p->msg, 3)) {
+                    const char *msg = "Update failed (at least partially) for worker '%s'";
+                    size_t size = strlen(msg) + strlen(aw->name) + 1;
+                    p->msg = jk_pool_alloc(s->pool, size);
+                    snprintf(p->msg, size, msg, aw->name);
+                }
+            }
             JK_TRACE_EXIT(l);
             return rc;
         }



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


Mime
View raw message