[Wine-devel] ntdll: If avail_mode is TRUE then stop reading from serial device even if 0 bytes are read

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Чт Авг 14 17:18:38 MSD 2008


----------- следующая часть -----------
From 34e3272a871f978978cc71c4744e5d37debd4ae6 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Thu, 14 Aug 2008 16:41:14 +0400
Subject: [PATCH] ntdll: If avail_mode is TRUE then stop reading from serial device even if 0 bytes are read

---
 dlls/ntdll/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index c9bcdb7..1db296c 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -632,7 +632,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
 
             if ((status = get_io_avail_mode( hFile, type, &avail_mode )))
                 goto err;
-            if (total && avail_mode)
+            if (avail_mode && (total || FD_TYPE_SERIAL == type))
             {
                 status = STATUS_SUCCESS;
                 goto done;
-- 
1.5.4.5.GIT



Подробная информация о списке рассылки Wine-devel