diff options
author | Christopher Faylor <me@cgf.cx> | 2001-12-11 00:24:46 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-12-11 00:24:46 +0000 |
commit | 40139114ea210664fec067383b12b885f0a60181 (patch) | |
tree | e70d9eb37fa4476bc84cee19260522363404ecfc /winsup/cygwin/select.cc | |
parent | cf77faefc8c0a468fb70947ffcd78d0d5b890d6f (diff) | |
download | cygnal-40139114ea210664fec067383b12b885f0a60181.tar.gz cygnal-40139114ea210664fec067383b12b885f0a60181.tar.bz2 cygnal-40139114ea210664fec067383b12b885f0a60181.zip |
* fhandler.h (fhandler_serial::ev): New class member.
* fhandler_serial.cc (fhandler_serial::raw_read): Use class member for event
status.
* select.cc (peek_serial): Ditto.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r-- | winsup/cygwin/select.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index c54e72723..56d818d56 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -865,7 +865,6 @@ struct serialinf static int peek_serial (select_record *s, bool) { - DWORD ev; COMSTAT st; fhandler_serial *fh = (fhandler_serial *)s->fh; @@ -890,19 +889,18 @@ peek_serial (select_record *s, bool) if (!fh->overlapped_armed) { - DWORD ev; COMSTAT st; ResetEvent (fh->io_status.hEvent); - if (!ClearCommError (h, &ev, &st)) + if (!ClearCommError (h, &fh->ev, &st)) { debug_printf ("ClearCommError"); goto err; } else if (st.cbInQue) return s->read_ready = true; - else if (WaitCommEvent (h, &ev, &fh->io_status)) + else if (WaitCommEvent (h, &fh->ev, &fh->io_status)) return s->read_ready = true; else if (GetLastError () == ERROR_IO_PENDING) fh->overlapped_armed = 1; @@ -923,7 +921,7 @@ peek_serial (select_record *s, bool) switch (WaitForMultipleObjects (2, w4, FALSE, to)) { case WAIT_OBJECT_0: - if (!ClearCommError (h, &ev, &st)) + if (!ClearCommError (h, &fh->ev, &st)) { debug_printf ("ClearCommError"); goto err; |