Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 90912 invoked from network); 7 Dec 2004 03:41:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Dec 2004 03:41:22 -0000 Received: (qmail 32597 invoked by uid 500); 7 Dec 2004 03:41:21 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 32560 invoked by uid 500); 7 Dec 2004 03:41:20 -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: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 32546 invoked by uid 99); 7 Dec 2004 03:41:20 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 06 Dec 2004 19:41:20 -0800 Received: (qmail 90892 invoked by uid 65534); 7 Dec 2004 03:41:19 -0000 Date: 7 Dec 2004 03:41:19 -0000 Message-ID: <20041207034119.90888.qmail@minotaur.apache.org> From: pquerna@apache.org To: cvs@httpd.apache.org Subject: svn commit: r110069 - /httpd/httpd/trunk/modules/loggers/mod_log_config.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: pquerna Date: Mon Dec 6 19:41:18 2004 New Revision: 110069 URL: http://svn.apache.org/viewcvs?view=rev&rev=110069 Log: * mod_log_config.c: Revert r109866 which used apr_file_writev instead of an apr_file_write w/ a memcpy. Roy Fielding provided a -1 veto on the commit, based on concerns that writev is not guaranteed to be atomic like a write. 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/viewcvs/httpd/httpd/trunk/modules/loggers/mod_log_config.c?view=diff&rev=110069&p1=httpd/httpd/trunk/modules/loggers/mod_log_config.c&r1=110068&p2=httpd/httpd/trunk/modules/loggers/mod_log_config.c&r2=110069 ============================================================================== --- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original) +++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Mon Dec 6 19:41:18 2004 @@ -1343,18 +1343,19 @@ apr_size_t len) { + char *str; + char *s; int i; apr_status_t rv; - struct iovec *vec; - vec = apr_palloc(r->pool, nelts * sizeof(struct iovec)); + str = apr_palloc(r->pool, len + 1); - for (i = 0; i < nelts; ++i) { - vec[i].iov_base = strs[i]; - vec[i].iov_len = strl[i]; + for (i = 0, s = str; i < nelts; ++i) { + memcpy(s, strs[i], strl[i]); + s += strl[i]; } - rv = apr_file_writev((apr_file_t*)handle, vec, nelts, &i); + rv = apr_file_write((apr_file_t*)handle, str, &len); return rv; }