Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 06DFCD423 for ; Sat, 22 Dec 2012 22:29:28 +0000 (UTC) Received: (qmail 70700 invoked by uid 500); 22 Dec 2012 22:29:28 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 70501 invoked by uid 500); 22 Dec 2012 22:29:27 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 70493 invoked by uid 99); 22 Dec 2012 22:29:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Dec 2012 22:29:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Dec 2012 22:29:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DDE6E2388980; Sat, 22 Dec 2012 22:29:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1425360 - /httpd/httpd/trunk/modules/loggers/mod_log_config.c Date: Sat, 22 Dec 2012 22:29:06 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121222222906.DDE6E2388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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]);