httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1425360 - /httpd/httpd/trunk/modules/loggers/mod_log_config.c
Date Sat, 22 Dec 2012 22:29:06 GMT
Author: sf
Date: Sat Dec 22 22:29:06 2012
New Revision: 1425360

URL: http://svn.apache.org/viewvc?rev=1425360&view=rev
Log:
style fixes, add comment

no code change

Modified:
    httpd/httpd/trunk/modules/loggers/mod_log_config.c

Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c?rev=1425360&r1=1425359&r2=1425360&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Sat Dec 22 22:29:06 2012
@@ -194,8 +194,8 @@ static void *ap_default_log_writer_init(
 static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
                                         const char* name);
 
-static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle);
-static ap_log_writer* ap_log_set_writer(ap_log_writer *handle);
+static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle);
+static ap_log_writer *ap_log_set_writer(ap_log_writer *handle);
 static ap_log_writer *log_writer = ap_default_log_writer;
 static ap_log_writer_init *log_writer_init = ap_default_log_writer_init;
 static int buffered_logs = 0; /* default unbuffered */
@@ -1504,7 +1504,7 @@ static void ap_register_log_handler(apr_
 
     apr_hash_set(log_hash, tag, 1, (const void *)log_struct);
 }
-static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle)
+static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle)
 {
     ap_log_writer_init *old = log_writer_init;
     log_writer_init = handle;
@@ -1533,6 +1533,10 @@ static apr_status_t ap_default_log_write
     int i;
     apr_status_t rv;
 
+    /*
+     * We do this memcpy dance because write() is atomic for len < PIPE_BUF,
+     * while writev() need not be.
+     */
     str = apr_palloc(r->pool, len + 1);
 
     for (i = 0, s = str; i < nelts; ++i) {
@@ -1613,6 +1617,10 @@ static apr_status_t ap_buffered_log_writ
     if (len >= LOG_BUFSIZE) {
         apr_size_t w;
 
+        /*
+         * We do this memcpy dance because write() is atomic for
+         * len < PIPE_BUF, while writev() need not be.
+         */
         str = apr_palloc(r->pool, len + 1);
         for (i = 0, s = str; i < nelts; ++i) {
             memcpy(s, strs[i], strl[i]);



Mime
View raw message