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/05 11:31:17 UTC

svn commit: r1649496 - in /tomcat/jk/trunk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c

Author: rjung
Date: Mon Jan  5 10:31:17 2015
New Revision: 1649496

URL: http://svn.apache.org/r1649496
Log:
Don't log trailing garbage from log buffer if
mod_jk log fails and we log instead to the Apache
error log.

Modified:
    tomcat/jk/trunk/native/apache-1.3/mod_jk.c
    tomcat/jk/trunk/native/apache-2.0/mod_jk.c

Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1649496&r1=1649495&r2=1649496&view=diff
==============================================================================
--- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Mon Jan  5 10:31:17 2015
@@ -2964,8 +2964,8 @@ static int JK_METHOD jk_log_to_file(jk_l
             what[used++] = '\n';
             if (write(log_fd, what, used) < 0 ) {
                 ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, NULL,
-                             "mod_jk: jk_log_to_file %s failed",
-                             what);
+                             "mod_jk: jk_log_to_file %.*s failed",
+                             used, what);
             }
         }
 

Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1649496&r1=1649495&r2=1649496&view=diff
==============================================================================
--- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Jan  5 10:31:17 2015
@@ -3200,8 +3200,8 @@ static int JK_METHOD jk_log_to_file(jk_l
                 char error[256];
                 apr_strerror(rv, error, 254);
                 ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
-                             "mod_jk: jk_log_to_file %s failed: %s",
-                             what, error);
+                             "mod_jk: jk_log_to_file %.*s failed: %s",
+                             used, what, error);
             }
             rv = apr_global_mutex_unlock(jk_log_lock);
             if (rv != APR_SUCCESS) {



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