You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Alex Varju <va...@antiflux.org> on 2002/12/19 21:10:06 UTC

[PATCH] Win32: include overlapped structure in WriteFile call

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;