tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r753140 - in /tomcat/connectors/trunk/jk: native/common/jk_lb_worker.c xdocs/miscellaneous/changelog.xml
Date Fri, 13 Mar 2009 07:04:50 GMT
Author: mturk
Date: Fri Mar 13 07:04:50 2009
New Revision: 753140

URL: http://svn.apache.org/viewvc?rev=753140&view=rev
Log:
Use the part before the dot as domain name, as defined when setting the worker.route

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=753140&r1=753139&r2=753140&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Fri Mar 13 07:04:50 2009
@@ -714,14 +714,24 @@
     unsigned int i;
     int d = 0;
     jk_uint64_t curmin = 0;
-
+    char rdomain[JK_SHM_STR_SIZ+1];
     int candidate = -1;
     int activation;
     lb_sub_worker_t wr;
     const char *domain = strchr(name, '.');
 
-    if (domain)
-        domain++;
+    if (domain) {
+        size_t dl = (size_t)(domain - name);
+        if (dl >= JK_SHM_STR_SIZ) {
+            /* Overflow */
+            return -1;
+        }
+        else {
+            strncpy(rdomain, domain, dl);
+            rdomain[dl] = '\0';
+            domain = rdomain;
+        }
+    }
     else
         domain = name;
     /* First try to see if we have available candidate */

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=753140&r1=753139&r2=753140&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Fri Mar 13 07:04:50 2009
@@ -134,7 +134,7 @@
       </update>
       <update>
       LB: If the sticky session affinity mark contains a dot, treat the
-      part after the dot as the domain name. This allows to have full node
+      part before the dot as the domain name. This allows to have full node
       session affinity with domain failover. (mturk)
       </update>
       <fix>



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


Mime
View raw message