Hi Uwe, In my opinion, I do think something is amiss with Wine's handling of serial port data after a program is done with them. Case in point: I've been able to sync a serial Palm cradle with wine on the first try. After that, Hotsync doesn't pick up the palm. I have to reboot before it works again. Maybe a flush is necessary after all. Might the corrected patch help the problem? ;-)
James Liggett
On Sun, 2005-07-31 at 16:12 +0200, Uwe Bonnes wrote:
"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.