summaryrefslogtreecommitdiff
path: root/indra/llmessage/llassetstorage.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-04-15 10:14:27 -0400
committerGitHub <noreply@github.com>2025-04-15 10:14:27 -0400
commitd19d44cc727b4c360ff8618c4c9375f4f10cec71 (patch)
tree46ce4ffb1a10c1203a0189918ddc536cf5a9a958 /indra/llmessage/llassetstorage.cpp
parent42dc4501b5c66ddeb9d1fa16ee424e2de988028b (diff)
parentcf2b4dbfb280986cf859b12fd55158d7b9e0ac3d (diff)
Merge pull request #3911 from secondlife/main
Merge 2025.03 release into develop.
Diffstat (limited to 'indra/llmessage/llassetstorage.cpp')
-rw-r--r--indra/llmessage/llassetstorage.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 2de59c1b6a..10fd56a68e 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -585,7 +585,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,
// static
void LLAssetStorage::removeAndCallbackPendingDownloads(const LLUUID& file_id, LLAssetType::EType file_type,
const LLUUID& callback_id, LLAssetType::EType callback_type,
- S32 result_code, LLExtStat ext_status)
+ S32 result_code, LLExtStat ext_status,
+ S32 bytes_fetched)
{
// find and callback ALL pending requests for this UUID
// SJB: We process the callbacks in reverse order, I do not know if this is important,
@@ -598,6 +599,10 @@ void LLAssetStorage::removeAndCallbackPendingDownloads(const LLUUID& file_id, LL
LLAssetRequest* tmp = *curiter;
if ((tmp->getUUID() == file_id) && (tmp->getType()== file_type))
{
+ if (bytes_fetched > 0)
+ {
+ tmp->mBytesFetched = bytes_fetched;
+ }
requests.push_front(tmp);
iter = gAssetStorage->mPendingDownloads.erase(curiter);
}
@@ -664,6 +669,7 @@ void LLAssetStorage::downloadCompleteCallback(
callback_type = req->getType();
}
+ S32 bytes_fetched = 0;
if (LL_ERR_NOERR == result)
{
// we might have gotten a zero-size file
@@ -677,21 +683,11 @@ void LLAssetStorage::downloadCompleteCallback(
}
else
{
-#if 1
- for (request_list_t::iterator iter = gAssetStorage->mPendingDownloads.begin();
- iter != gAssetStorage->mPendingDownloads.end(); ++iter )
- {
- LLAssetRequest* dlreq = *iter;
- if ((dlreq->getUUID() == file_id) && (dlreq->getType()== file_type))
- {
- dlreq->mBytesFetched = vfile.getSize();
- }
- }
-#endif
+ bytes_fetched = vfile.getSize();
}
}
- removeAndCallbackPendingDownloads(file_id, file_type, callback_id, callback_type, result, ext_status);
+ removeAndCallbackPendingDownloads(file_id, file_type, callback_id, callback_type, result, ext_status, bytes_fetched);
}
void LLAssetStorage::getEstateAsset(