mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 16:04:06 +00:00
opt: log more info about the stream (#1858)
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
* opt: log more info about the stream * opt: log more info about the stream * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
66a45f975e
commit
c846c5d89b
|
@ -380,14 +380,21 @@ qint64 ArticleResourceReply::readData( char * out, qint64 maxSize )
|
|||
return finished ? -1 : 0;
|
||||
}
|
||||
|
||||
|
||||
qint64 const left = avail - alreadyRead;
|
||||
|
||||
qint64 const toRead = maxSize < left ? maxSize : left;
|
||||
if ( !toRead && finished ) {
|
||||
return -1;
|
||||
}
|
||||
GD_DPRINTF( "====reading %d of (%lld) bytes . Finished: %d", (int)toRead, avail, finished );
|
||||
if ( toRead == 0 ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
GD_DPRINTF( "====reading %lld of (%lld) bytes, %lld bytes readed . Finish status: %d",
|
||||
toRead,
|
||||
avail,
|
||||
alreadyRead,
|
||||
finished );
|
||||
|
||||
try {
|
||||
req->getDataSlice( alreadyRead, toRead, out );
|
||||
|
|
Loading…
Reference in a new issue