2007-10-11 Marcus Brinkmann <marcus@g10code.de>
* kdpipeiodevice.cpp: New version from Frank Osterfeld.
This commit is contained in:
parent
d7af11c7e2
commit
4a86704d19
@ -1,3 +1,7 @@
|
|||||||
|
2007-10-11 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* kdpipeiodevice.cpp: New version from Frank Osterfeld.
|
||||||
|
|
||||||
2007-10-09 Marcus Brinkmann <marcus@g10code.de>
|
2007-10-09 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* kdpipeiodevice.cpp: New version from Frank Osterfeld and Marc
|
* kdpipeiodevice.cpp: New version from Frank Osterfeld and Marc
|
||||||
|
@ -728,7 +728,12 @@ void Reader::run() {
|
|||||||
DWORD numRead;
|
DWORD numRead;
|
||||||
const bool ok = ReadFile( handle, buffer + wptr, numBytes, &numRead, 0 );
|
const bool ok = ReadFile( handle, buffer + wptr, numBytes, &numRead, 0 );
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
if ( !ok ) {
|
if ( ok ) {
|
||||||
|
if ( numRead == 0 ) {
|
||||||
|
qDebug( "%p: Reader::run: got eof (numRead==0)", this );
|
||||||
|
eof = true;
|
||||||
|
}
|
||||||
|
} else { // !ok
|
||||||
errorCode = static_cast<int>( GetLastError() );
|
errorCode = static_cast<int>( GetLastError() );
|
||||||
if ( errorCode == ERROR_BROKEN_PIPE ) {
|
if ( errorCode == ERROR_BROKEN_PIPE ) {
|
||||||
assert( numRead == 0 );
|
assert( numRead == 0 );
|
||||||
@ -758,7 +763,7 @@ void Reader::run() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
qDebug( "%p: Reader::run: read %ld bytes", this, static_cast<long>(numRead) );
|
qDebug( "%p: Reader::run: read %ld bytes", this, static_cast<long>(numRead) );
|
||||||
qDebug( "%p (fd=%d): KDPipeIODevice::readData: %s", this, fd, buffer );
|
qDebug( "%p: Reader::run(fd=%d): %s", this, fd, buffer );
|
||||||
|
|
||||||
if ( numRead > 0 ) {
|
if ( numRead > 0 ) {
|
||||||
qDebug( "%p: Reader::run: buffer before: rptr=%4d, wptr=%4d", this, rptr, wptr );
|
qDebug( "%p: Reader::run: buffer before: rptr=%4d, wptr=%4d", this, rptr, wptr );
|
||||||
|
Loading…
Reference in New Issue
Block a user