Alex Henrie : ntdll: Skip synchronous read if a serial read interval timeout is set.
Alexandre Julliard
julliard at winehq.org
Mon Dec 19 13:10:38 CST 2016
Module: wine
Branch: stable
Commit: 64ddc0bff03bb676a43163891aad9f61b955875d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=64ddc0bff03bb676a43163891aad9f61b955875d
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Thu May 26 23:34:26 2016 -0600
ntdll: Skip synchronous read if a serial read interval timeout is set.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 84fcaafb895f08b3513486f7b687882a2ffca1f8)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/ntdll/file.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index ede0ec1..646e3f0 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -912,6 +912,20 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
}
}
+ if (type == FD_TYPE_SERIAL && async_read && length)
+ {
+ /* an asynchronous serial port read with a read interval timeout needs to
+ skip the synchronous read to make sure that the server starts the read
+ interval timer after the first read */
+ if ((status = get_io_timeouts( hFile, type, length, TRUE, &timeouts ))) goto err;
+ if (timeouts.interval)
+ {
+ status = register_async_file_read( hFile, hEvent, apc, apc_user, io_status,
+ buffer, total, length, FALSE );
+ goto err;
+ }
+ }
+
for (;;)
{
if ((result = read( unix_handle, (char *)buffer + total, length - total )) >= 0)
More information about the wine-cvs
mailing list