Cygwin: serial: select: fix previous revamp patch
- We need a verify function. - The event object referenced in WaitCommEvent must not be a local var, move it into fhandler_serial.
This commit is contained in:
parent
2929599590
commit
e4f9fc92ac
@ -1685,6 +1685,7 @@ class fhandler_serial: public fhandler_base
|
||||
pid_t pgrp_;
|
||||
int rts; /* for Windows 9x purposes only */
|
||||
int dtr; /* for Windows 9x purposes only */
|
||||
DWORD event; /* for select */
|
||||
|
||||
public:
|
||||
OVERLAPPED io_status;
|
||||
|
@ -1493,14 +1493,18 @@ serial_read_cleanup (select_record *s, select_stuff *stuff)
|
||||
}
|
||||
}
|
||||
|
||||
verify_serial (select_record *me, fd_set *rfds, fd_set *wfds, fd_set *efds)
|
||||
{
|
||||
return peek_serial (me, true);
|
||||
}
|
||||
|
||||
select_record *
|
||||
fhandler_serial::select_read (select_stuff *ss)
|
||||
{
|
||||
DWORD event;
|
||||
select_record *s = ss->start.next;
|
||||
|
||||
s->startup = no_startup;
|
||||
s->verify = verify_ok;
|
||||
s->verify = verify_serial;
|
||||
s->cleanup = serial_read_cleanup;
|
||||
s->peek = peek_serial;
|
||||
s->read_selected = true;
|
||||
@ -1521,7 +1525,7 @@ fhandler_serial::select_write (select_stuff *ss)
|
||||
select_record *s = ss->start.next;
|
||||
|
||||
s->startup = no_startup;
|
||||
s->verify = verify_ok;
|
||||
s->verify = verify_serial;
|
||||
s->peek = peek_serial;
|
||||
s->write_selected = true;
|
||||
s->write_ready = true;
|
||||
@ -1534,7 +1538,7 @@ fhandler_serial::select_except (select_stuff *ss)
|
||||
select_record *s = ss->start.next;
|
||||
|
||||
s->startup = no_startup;
|
||||
s->verify = verify_ok;
|
||||
s->verify = verify_serial;
|
||||
s->peek = peek_serial;
|
||||
s->except_selected = false; // Can't do this
|
||||
s->except_ready = false;
|
||||
|
Loading…
Reference in New Issue
Block a user