You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2015/01/06 15:10:28 UTC

svn commit: r1649807 - in /tomcat/jk/trunk/native/common: jk_ajp_common.c jk_uri_worker_map.c

Author: rjung
Date: Tue Jan  6 14:10:27 2015
New Revision: 1649807

URL: http://svn.apache.org/r1649807
Log:
Join two separate debug log messages.

Modified:
    tomcat/jk/trunk/native/common/jk_ajp_common.c
    tomcat/jk/trunk/native/common/jk_uri_worker_map.c

Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1649807&r1=1649806&r2=1649807&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_ajp_common.c (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.c Tue Jan  6 14:10:27 2015
@@ -3443,15 +3443,10 @@ int JK_METHOD ajp_maintain(jk_worker_t *
             }
         }
         free(m_sock);
-        if (n && JK_IS_DEBUG_LEVEL(l))
+        if ((k + n) && JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
-                   "(%s) recycled %u sockets in %d seconds from %u pool slots",
-                   aw->name, n, (int)(difftime(time(NULL), mstarted)),
-                   aw->ep_cache_sz);
-        if (k && JK_IS_DEBUG_LEVEL(l))
-            jk_log(l, JK_LOG_DEBUG,
-                   "(%s) pinged %u sockets in %d seconds from %u pool slots",
-                   aw->name, k, (int)(difftime(time(NULL), mstarted)),
+                   "(%s) pinged %u and recycled %u sockets in %d seconds from %u pool slots",
+                   aw->name, k, n, (int)(difftime(time(NULL), mstarted)),
                    aw->ep_cache_sz);
         JK_TRACE_EXIT(l);
         return JK_TRUE;

Modified: tomcat/jk/trunk/native/common/jk_uri_worker_map.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_uri_worker_map.c?rev=1649807&r1=1649806&r2=1649807&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_uri_worker_map.c (original)
+++ tomcat/jk/trunk/native/common/jk_uri_worker_map.c Tue Jan  6 14:10:27 2015
@@ -1074,6 +1074,8 @@ const char *map_uri_to_worker_ext(jk_uri
     int reject_unsafe;
     int collapse_slashes;
     int rv = -1;
+    size_t uri_len;
+    size_t remain;
     char  url[JK_MAX_URI_LEN+1];
 
     JK_TRACE_ENTER(l);
@@ -1142,11 +1144,13 @@ const char *map_uri_to_worker_ext(jk_uri
     /* Make the copy of the provided uri and strip
      * everything after the first ';' char.
      */
-    for (i = 0; i < strlen(uri); i++) {
-        if (i == JK_MAX_URI_LEN) {
+    uri_len = strlen(uri);
+    remain = JK_MAX_URI_LEN - vhost_len;
+    for (i = 0; i < uri_len; i++) {
+        if (i == remain) {
             jk_log(l, JK_LOG_WARNING,
                    "URI %s is invalid. URI must be smaller than %d chars",
-                   uri, JK_MAX_URI_LEN);
+                   uri, remain);
             JK_TRACE_EXIT(l);
             return NULL;
         }



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