Check for completed overlappeds in ReadComm16 to solve problems with

programs that loop on it but don't get data.
This commit is contained in:
Mike McCormack 2001-11-23 18:26:30 +00:00 committed by Alexandre Julliard
parent cf80c545a5
commit cce46e5760
1 changed files with 3 additions and 0 deletions

View File

@ -1068,6 +1068,9 @@ INT16 WINAPI ReadComm16(INT16 cid,LPSTR lpvBuf,INT16 cbRead)
return -1;
}
if(0==comm_inbuf(ptr))
WaitForSingleObjectEx( COM[cid].read_ov.hEvent, 1, TRUE);
/* read unget character */
if (ptr->unget>=0) {
*lpvBuf++ = ptr->unget;