Patch from Gert-Jan Vons: create an event handle to go in the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 12 Jan 2009 20:41:28 +0000 (20:41 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 12 Jan 2009 20:41:28 +0000 (20:41 +0000)
commitded2f78aa1577f8673165952ce737405a4902f78
tree77d7f3d93bcde3c4e6a87f7accd5f017fbce381d
parentd9e0300f903aa7cfb85a94480ad544082a7a6c35
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.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@8410 cda61777-01e9-0310-a592-d414129be87e
windows/winhandl.c