BUGFIX for async file IO

Martin Wilck Martin.Wilck at fujitsu-siemens.com
Tue Apr 23 12:48:11 CDT 2002


This patch fixes a bug in my previous patch:

http://www.winehq.com/hypermail/wine-cvs/2002/04/0157.html

that will cause a segfault for overlapped WriteFile() calls.

Patch against CVS 2002/04/23.

Modified files:
	files:	file.c

--- CVS/wine/files/file.c	Tue Apr 23 17:50:07 2002
+++ TMP/wine/files/file.c	Tue Apr 23 17:50:38 2002
@@ -1740,9 +1740,9 @@
         goto error;
     }

-    ovp->async.ops = &fileio_async_ops;
+    ovp->async.ops = ( lpCompletionRoutine ? &fileio_async_ops : &fileio_nocomp_async_ops );
     ovp->async.handle = hFile;
-    ovp->async.fd = FILE_GetUnixHandle( hFile, GENERIC_WRITE );
+    ovp->async.fd = fd;
     ovp->async.type = ASYNC_TYPE_WRITE;
     ovp->async.func = FILE_AsyncWriteService;
     ovp->lpOverlapped = overlapped;






More information about the wine-patches mailing list