diff options
author | Don Kjer <don@lindenlab.com> | 2007-09-28 23:32:53 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-09-28 23:32:53 +0000 |
commit | b089fc559a5dc527ed5e0422e82abf3b1dd5f1b2 (patch) | |
tree | baa68e98452406c03a3dbe21c99a901f769c8890 /indra/llmessage | |
parent | ab8dd2b55008090a1f18fb107f897c736d98a760 (diff) |
EFFECTIVE MERGE: svn merge -r 68999:69916 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance into release
** This should be the last merge from branches/maintenance. All future merges will be from new maintenance-# branches off release **
ACTUAL MERGE: svn merge -r70609:70621 svn+ssh://svn/svn/linden/branches/maintenance-0-qa-r70556
RELATED MERGE: svn merge -r69921:70316 svn+ssh://svn/svn/linden/branches/maintenance-0-qa
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llhttpassetstorage.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 7b07dfd0e0..142e6a50e8 100644 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -316,7 +316,7 @@ size_t LLHTTPAssetRequest::readCompressedData(void* data, size_t size) while (mZStream.avail_out > 0) { - if (mZStream.avail_in == 0 && !mZInputExhausted) + if (mZStream.avail_in == 0 && !mZInputExhausted) { S32 to_read = llmin(COMPRESSED_INPUT_BUFFER_SIZE, (S32)(mVFile->getSize() - mVFile->tell())); @@ -324,14 +324,9 @@ size_t LLHTTPAssetRequest::readCompressedData(void* data, size_t size) if ( to_read > 0 ) { mVFile->read((U8*)mZInputBuffer, to_read); /*Flawfinder: ignore*/ + mZStream.next_in = (Bytef*)mZInputBuffer; + mZStream.avail_in = mVFile->getLastBytesRead(); } - else - { - llwarns << "LLHTTPAssetRequest::readCompressedData has zero read length" << llendl; - break; - } - mZStream.next_in = (Bytef*)mZInputBuffer; - mZStream.avail_in = mVFile->getLastBytesRead(); mZInputExhausted = mZStream.avail_in == 0; } @@ -339,8 +334,13 @@ size_t LLHTTPAssetRequest::readCompressedData(void* data, size_t size) int r = deflate(&mZStream, mZInputExhausted ? Z_FINISH : Z_NO_FLUSH); - if (r == Z_STREAM_END || r < 0) + if (r == Z_STREAM_END || r < 0 || mZInputExhausted) { + if (r < 0) + { + llwarns << "LLHTTPAssetRequest::readCompressedData: deflate returned error code " + << (S32) r << llendl; + } break; } } |