[1/2] ntdll: Properly set flag which indicates buffer empty state. Take 2.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Aug 28 20:26:24 CDT 2013
This time without removing todo_wine from tests to avoid test
failures on Alexandre's computer with a real COM port. This
needs additional investigation.
---
dlls/kernel32/tests/comm.c | 1 +
dlls/ntdll/serial.c | 13 +++++--------
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c
index 4b0eb82..647c07a 100644
--- a/dlls/kernel32/tests/comm.c
+++ b/dlls/kernel32/tests/comm.c
@@ -851,6 +851,7 @@ todo_wine
{
res = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE);
ok(res, "GetOverlappedResult reported error %d\n", GetLastError());
+todo_wine
ok(bytes == sizeof(evtmask), "expected %u, written %u\n", (UINT)sizeof(evtmask), bytes);
res = TRUE;
}
diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c
index 93991f9..de699ef 100644
--- a/dlls/ntdll/serial.c
+++ b/dlls/ntdll/serial.c
@@ -838,16 +838,13 @@ static NTSTATUS get_irq_info(int fd, serial_irq_info *irq_info)
TRACE("TIOCSERGETLSR err %s\n", strerror(errno));
#endif
#ifdef TIOCOUTQ /* otherwise we log when the out queue gets empty */
- if (ioctl(fd, TIOCOUTQ, &irq_info->temt))
+ if (!ioctl(fd, TIOCOUTQ, &out))
{
- TRACE("TIOCOUTQ err %s\n", strerror(errno));
- return FILE_GetNtStatus();
- }
- else
- {
- if (irq_info->temt == 0)
- irq_info->temt = 1;
+ irq_info->temt = out == 0;
+ return STATUS_SUCCESS;
}
+ TRACE("TIOCOUTQ err %s\n", strerror(errno));
+ return FILE_GetNtStatus();
#endif
return STATUS_SUCCESS;
}
--
1.8.3.4
More information about the wine-patches
mailing list