Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 60490 invoked from network); 26 Jan 2006 04:38:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jan 2006 04:38:07 -0000 Received: (qmail 10436 invoked by uid 500); 26 Jan 2006 04:38:07 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 10329 invoked by uid 500); 26 Jan 2006 04:38:06 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 10318 invoked by uid 99); 26 Jan 2006 04:38:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 20:38:06 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Jan 2006 20:38:06 -0800 Received: (qmail 60350 invoked by uid 65534); 26 Jan 2006 04:37:46 -0000 Message-ID: <20060126043746.60349.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r372436 - in /apr/apr/branches/1.2.x: CHANGES file_io/win32/readwrite.c Date: Thu, 26 Jan 2006 04:37:45 -0000 To: commits@apr.apache.org From: rooneg@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rooneg Date: Wed Jan 25 20:37:44 2006 New Revision: 372436 URL: http://svn.apache.org/viewcvs?rev=372436&view=rev Log: Merge r355812 to 1.2.x. Original log message: Cause apr_file_write_full on win32 to consider the timeout value set by apr_file_pipe_timeout_set. PR 30182 [also note the last changes are all still tracking to 1.3.0] Modified: apr/apr/branches/1.2.x/CHANGES apr/apr/branches/1.2.x/file_io/win32/readwrite.c Modified: apr/apr/branches/1.2.x/CHANGES URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/CHANGES?rev=372436&r1=372435&r2=372436&view=diff ============================================================================== --- apr/apr/branches/1.2.x/CHANGES (original) +++ apr/apr/branches/1.2.x/CHANGES Wed Jan 25 20:37:44 2006 @@ -2,6 +2,10 @@ *) Keep testpipe.c from hanging on win32. [Garrett Rooney] + *) Cause apr_file_write_full on win32 to consider the timeout value set by + apr_file_pipe_timeout_set. PR 30182 + [] + *) Fix assertion from double close of a handle with a rwlock on win32. [Evgueni Brevnov ] Modified: apr/apr/branches/1.2.x/file_io/win32/readwrite.c URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/file_io/win32/readwrite.c?rev=372436&r1=372435&r2=372436&view=diff ============================================================================== --- apr/apr/branches/1.2.x/file_io/win32/readwrite.c (original) +++ apr/apr/branches/1.2.x/file_io/win32/readwrite.c Wed Jan 25 20:37:44 2006 @@ -310,8 +310,20 @@ (*nbytes) = 0; rv = apr_get_os_error(); if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) { - /* Wait for the pending i/o (put a timeout here?) */ - rv = WaitForSingleObject(thefile->pOverlapped->hEvent, INFINITE); + + DWORD timeout_ms; + + if (thefile->timeout == 0) { + timeout_ms = 0; + } + else if (thefile->timeout < 0) { + timeout_ms = INFINITE; + } + else { + timeout_ms = thefile->timeout / 1000; + } + + rv = WaitForSingleObject(thefile->pOverlapped->hEvent, timemilliseconds); switch (rv) { case WAIT_OBJECT_0: GetOverlappedResult(thefile->filehand, thefile->pOverlapped, (LPDWORD)nbytes, TRUE);