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:49:42 +0000 (03:49 -0700)
commit6735a391c2a1e3be01ac9e68b44ec0974592c11c
tree0e90c3ee2aa31273ce38fb9173e6c80fe85fa6bf
parentbd8d061d0f63158b5b03814d77cb76fdf5a0abad
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