]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Patch from Gert-Jan Vons: create an event handle to go in the
authorSimon Tatham <anakin@pobox.com>
Mon, 12 Jan 2009 20:41:28 +0000 (20:41 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 12 Jan 2009 20:41:28 +0000 (20:41 +0000)
commit201c2c295bd7b573d17480990c847553507da540
tree77d7f3d93bcde3c4e6a87f7accd5f017fbce381d
parent36f502fa9311a62923cf83b34a4016ad68aaa33f
Patch from Gert-Jan Vons: create an event handle to go in the
OVERLAPPED structure in output threads, as we already do for input
threads. This apparently sorts out a hanging issue with serial ports
when trying to do simultaneous read and write, because (GJV says,
and it sounds plausible to me) in the absence of that event object
Windows signals the file handle itself to notify GetOverlappedResult
that it can return - and since the file handle might be being
signalled by a read operation instead, that leads to ambiguity.
Using an explicit event object in both directions means Windows
always knows which way the data is going.

Also a trivial fix in handle_output_new(), which was referencing the
wrong element of a union due to a copy and paste error. (Since the
result was address-taken and cast to void *, this wasn't a
functional error, but it was conceptually wrong.)

[originally from svn r8410]
windows/winhandl.c