"Alexandre" == Alexandre Julliard julliard@winehq.org writes:
Alexandre> Uwe Bonnes bon@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.