What steps will reproduce the problem?
1. somethimes, did not emit bytesWritten()
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
lastest
Please provide any additional information below.
Bellow is changed the overlapped event checking routine.
in win_qextserialport.cpp
void QextSerialPort::onWinEvent(HANDLE h)
...
#if 0//original
if (GetOverlappedResult(Win_Handle, o, & numBytes, false)) {
overlapsToDelete.append(o);
totalBytesWritten += numBytes;
} else if( GetLastError() != ERROR_IO_INCOMPLETE ) {
overlapsToDelete.append(o);
qWarning() << "CommEvent overlapped write error:" << GetLastError();
}
#else //changed
bool result = false;
do
{
result = GetOverlappedResult(Win_Handle, o, & numBytes, false);
if(result)
{
overlapsToDelete.append(o);
totalBytesWritten += numBytes;
break;
}
else if (GetLastError() != ERROR_IO_INCOMPLETE)
{
overlapsToDelete.append(o);
qWarning() << "CommEvent overlapped write error:" << GetLastError();
break;
}
}while(!result);
#endif
Original issue reported on code.google.com by tyranno1223 on 23 Aug 2011 at 7:33
Original issue reported on code.google.com by
tyranno1223
on 23 Aug 2011 at 7:33