[Resent] Don't report partial read while timeout not expired

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sat Jul 2 11:51:39 CDT 2005


Changelog:
	dlls/ntdll/file.c: NtRead|WriteFile
	Don't report partial read while timeout not yet expired, but try
	transaction again.
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/ntdll/file.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/file.c,v
retrieving revision 1.92
diff -u -r1.92 file.c
--- wine/dlls/ntdll/file.c	20 Jun 2005 10:31:04 -0000	1.92
+++ wine/dlls/ntdll/file.c	2 Jul 2005 16:42:35 -0000
@@ -536,6 +536,10 @@
         if (flags & FD_FLAG_TIMEOUT)
         {
             ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
+            while (io_status->u.Status  == STATUS_PENDING)
+            {
+                ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
+            }
             NtClose(hEvent);
             if (ret != STATUS_USER_APC)
                 fileio->queue_apc_on_error = 1;
@@ -749,6 +753,10 @@
         if (flags & FD_FLAG_TIMEOUT)
         {
             ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
+            while (io_status->u.Status  == STATUS_PENDING)
+            {
+                ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
+            }
             NtClose(hEvent);
             if (ret != STATUS_USER_APC)
                 fileio->queue_apc_on_error = 1;



More information about the wine-patches mailing list