http://bugs.winehq.org/show_bug.cgi?id=6895
Summary: Wrong ReadFile timeout reading from serial (COM) port Product: Wine Version: 0.9.27. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-kernel AssignedTo: wine-bugs@winehq.org ReportedBy: mail.to.mr@gmx.de
In Windows, there is a special combination of COMMTIMEOUTS (SetCommTimeouts function) settings for reading from serial devices:
if an application sets the elements ReadIntervalTimeout and ReadTotalTimeoutMultiplier to MAXDWORD and sets ReadTotalTimeoutConstant to a value greater than zero and less than MAXDWORD, one of the following occurs when the ReadFile function is called:
1. If there are characters in the input buffer, ReadFile returns immediately with the characters in the buffer. 2. If there are no characters in the input buffer, ReadFile waits until a character arrives and then returns immediately. 3. If no characters arrive within the time specified by ReadTotalTimeoutConstant, ReadFile times out.
This does not work correctly in wine (version 0.9.27), the ReadFile always waits the timeout specified by ReadTotalTimeoutConstant in case 1 and 2 above if the number of characters in the input buffer is less than the number of characters expected.
This can result in a very slow communication in applications which use this feature.