apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Varju <va...@antiflux.org>
Subject [PATCH] Win32: include overlapped structure in WriteFile call
Date Thu, 19 Dec 2002 20:10:06 GMT
A co-worker pointed out to me that the WriteFile call in apr_file_flush on
Windows does not include the overlapped structure.  I can't find anything
in the logs or mail archives that indicates this is intentional, so I
thought I'd pass this along.

Alex.

Index: srclib/apr/file_io/win32/readwrite.c
===================================================================
RCS file: /webct1/cvsroot/external/apache2/srclib/apr/file_io/win32/readwrite.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 readwrite.c
--- srclib/apr/file_io/win32/readwrite.c	12 Sep 2002 23:46:38 -0000	1.1.1.2
+++ srclib/apr/file_io/win32/readwrite.c	19 Dec 2002 20:02:37 -0000
@@ -445,7 +445,7 @@ APR_DECLARE(apr_status_t) apr_file_flush
         apr_status_t rc = 0;

         if (thefile->direction == 1 && thefile->bufpos) {
-            if (!WriteFile(thefile->filehand, thefile->buffer, thefile->bufpos,
&written, NULL))
+            if (!WriteFile(thefile->filehand, thefile->buffer, thefile->bufpos,
&written, thefile->pOverlapped))
                 rc = apr_get_os_error();
             thefile->filePtr += written;



Mime
View raw message