Fixes for asynchronous file IO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Fuchs has reported some problems with asynchronous file IO that
are fixed by this patch. 

Index: files/file.c
===================================================================
RCS file: /home/wine/wine/files/file.c,v
retrieving revision 1.170
diff -u -r1.170 file.c
--- files/file.c	21 Nov 2002 03:45:03 -0000	1.170
+++ files/file.c	26 Nov 2002 10:34:21 -0000
@@ -152,7 +152,7 @@
     async_fileio *ovp = (async_fileio*) data;
     TRACE ("data: %p\n", ovp);
 
-    ovp->completion_func( ovp->lpOverlapped->Internal,
+    ovp->completion_func( RtlNtStatusToDosError ( ovp->lpOverlapped->Internal ),
                           ovp->lpOverlapped->InternalHigh,
                           ovp->lpOverlapped );
 
@@ -1697,6 +1705,11 @@
         r = FILE_GetNtStatus ();
         goto async_end;
     }
+    else if ( result == 0 )
+    {
+        r = ( lpOverlapped->InternalHigh ? STATUS_SUCCESS : STATUS_END_OF_FILE );
+        goto async_end;
+    }
 
     lpOverlapped->InternalHigh += result;
     TRACE("read %d more bytes %ld/%d so far\n",result,lpOverlapped->InternalHigh,fileio->count);



-- 
Martin Wilck                Phone: +49 5251 8 15113
Fujitsu Siemens Computers   Fax:   +49 5251 8 20409
Heinz-Nixdorf-Ring 1	    mailto:Martin.Wilck@Fujitsu-Siemens.com
D-33106 Paderborn           http://www.fujitsu-siemens.com/primergy







[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux