kernel32: Skip modem status tests if GetModemStatus failed.

This commit is contained in:
Marcus Meissner 2007-05-20 23:30:11 +02:00 committed by Alexandre Julliard
parent 74de3e1754
commit b45367347a
1 changed files with 6 additions and 1 deletions

View File

@ -1413,6 +1413,7 @@ static void test_WaitRing(HANDLE hcom)
HANDLE alarmThread;
DWORD args[3], defaultStat;
DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0;
BOOL ret;
ok(GetCommState(hcom, &dcb), "GetCommState failed\n");
if (dcb.fDtrControl == DTR_CONTROL_DISABLE)
@ -1421,7 +1422,11 @@ static void test_WaitRing(HANDLE hcom)
return;
}
args[0]= TIMEOUT >>1;
ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n");
ok((ret = GetCommModemStatus(hcom, &defaultStat)), "GetCommModemStatus failed\n");
if (!ret) {
skip("modem status failed -> skip.\n");
return;
}
if(defaultStat & MS_RING_ON)
args[1] = CLRDTR;
else