Re: [2/3] server: Use tcdrain() instead of tcflush() to implement FlushFileBuffers() for a COM port.
Dmitry Timoshkov <dmitry(a)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. -- Alexandre Julliard julliard(a)winehq.org
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(a)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
Alexandre Julliard <julliard(a)winehq.org> wrote:
It's a blocking call, you can't do that on the server side.
Can then something like in the patch from Wolfgang Walter be done instead? -- Dmitry.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
Alexandre Julliard <julliard(a)winehq.org> wrote:
It's a blocking call, you can't do that on the server side.
Can then something like in the patch from Wolfgang Walter be done instead?
Something like that, yes. -- Alexandre Julliard julliard(a)winehq.org
participants (3)
-
Alexandre Julliard -
Dmitry Timoshkov -
Wolfgang Walter