[2/3] server: Use tcdrain() instead of tcflush() to implement FlushFileBuffers() for a COM port.

Wolfgang Walter wine at stwm.de
Mon Aug 26 05:02:33 CDT 2013


Hello Dmitry,

we had this problem, too. I sent a patch to wine-devel some time ago (I think 
2008). It had the same flaw as yours. I sent a different patch after Alexandre 
gave me the same answer. I then posted 2009 an different one. It did not make 
it into wine, though. I don't know why as there was no answer. Therefor I keep 
it since then in our own repository together with other serial fixes (i.e. to 
make most USB serial adapters working better).

Attached the patch (rebased on 1.6). We use it rebased on then the actual wine 
versions sincd 2009 and it works for us.

Am Montag, 26. August 2013, 10:56:29 schrieb Alexandre Julliard:
> Dmitry Timoshkov <dmitry at baikal.ru> writes:
> > MSDN for FlushFileBuffers says:
> > Flushes the buffers of a specified file and causes all buffered data to be
> > written to a file.
> > 
> > Linux man page says:
> > tcdrain() waits until all output written to the object referred to by fd
> > has been transmitted.
> 
> It's a blocking call, you can't do that on the server side.

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts
Abteilungsleiter IT
Leopoldstraße 15
80802 München
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-serial_flush-implements-FlushFileBuffers-incorrectly.patch
Type: text/x-patch
Size: 4352 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130826/1c2a1ec3/attachment.bin>


More information about the wine-devel mailing list