libaltos: use PurgeComm in Windows altos_close to abort in-progress ops
authorKeith Packard <keithp@keithp.com>
Fri, 17 May 2013 10:34:50 +0000 (03:34 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 17 May 2013 10:51:16 +0000 (03:51 -0700)
commitfbe7857e371fa8ffa726fda2b43d4eddd551eaa4
treef9011b2f8045de4a0b8e09e777d6bed17ff63d02
parent3b457ff8d43630c04e0cb22bb3a2765be5e188bd
libaltos: use PurgeComm in Windows altos_close to abort in-progress ops

Instead of manually signalling the related events, use PurgeComm which
can then abort the operations itself. Also make sure all of the
relevant handles are set to INVALID before closing them to avoid race conditions.

Signed-off-by: Keith Packard <keithp@keithp.com>
libaltos/libaltos.c