Flush serial port

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sun Jul 31 09:12:28 CDT 2005


>>>>> "Alexandre" == Alexandre Julliard <julliard at winehq.org> writes:

    Alexandre> Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de> writes:
    >> Changelog: wine/server/file.c: create_file() If we open a serial
    >> device, flush it

    Alexandre> This should be done in serial.c, but could you please explain
    Alexandre> why this is necessary?

Testing with the loopback adapter again, it clearly shows that flush is
necessary. I am not sure, if the flush should be done on open or close. I
decided to go for flushing with open().
If you want to test yourself, shortcut RXD to TXD and run the
kernel/test/comm.c with  LOOPBACK_TXD_RXD set to TRUE. The test for cbInQue
== 0 in test_ClearCommErrors() will fail with a newly opended FileHandle
when something was put into the receive buffer before. The test succeeds on XP.

A corrected patch is in wine-patches.

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the wine-devel mailing list