Dmitry Timoshkov : ntdll: Stop waiting for COM-port events if the device handle gets closed.
Module: wine Branch: master Commit: f4f5d06df44dcd9b52ce7b701b9d38df71318409 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f4f5d06df44dcd9b52ce7b701b... Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Aug 28 16:15:13 2013 +0900 ntdll: Stop waiting for COM-port events if the device handle gets closed. --- dlls/ntdll/serial.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c index a389d0f..93991f9 100644 --- a/dlls/ntdll/serial.c +++ b/dlls/ntdll/serial.c @@ -306,7 +306,7 @@ static NTSTATUS get_modem_status(int fd, DWORD* lpModemStat) (*lpModemStat & MS_CTS_ON) ? "MS_CTS_ON " : ""); return STATUS_SUCCESS; } - WARN("ioctl failed\n"); + WARN("TIOCMGET err %s\n", strerror(errno)); status = FILE_GetNtStatus(); #endif return status; @@ -928,7 +928,11 @@ static DWORD CALLBACK wait_for_event(LPVOID arg) NtDelayExecution(FALSE, &time); get_irq_info(fd, &new_irq_info); if (get_modem_status(fd, &new_mstat)) + { TRACE("get_modem_status failed\n"); + *commio->events = 0; + break; + } *commio->events = check_events(fd, commio->evtmask, &new_irq_info, &commio->irq_info, new_mstat, commio->mstat);
participants (1)
-
Alexandre Julliard