summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-01-31 19:09:05 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-01-31 19:09:05 +0200
commit314ef5389cb57646fc20971335e65b6a8dab7235 (patch)
tree75157750aabcad22cc07d5495d63ce6b9b9701cd /indra
parente97976831d883d9c8ff40a0442a5905ac05dd45a (diff)
#3488 Fix last retry not saving handle
Request was sent and handle is valid, save it
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmeshrepository.cpp30
-rw-r--r--indra/newview/llmeshrepository.h6
2 files changed, 13 insertions, 23 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 821288429d..186e4322f6 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -963,7 +963,7 @@ void LLMeshRepoThread::run()
{
incomplete.emplace_back(req);
}
- else if (!fetchMeshSkinInfo(req.mId, req.canRetry()))
+ else if (!fetchMeshSkinInfo(req.mId))
{
if (req.canRetry())
{
@@ -1010,7 +1010,7 @@ void LLMeshRepoThread::run()
// failed to load before, wait a bit
incomplete.push_front(req);
}
- else if (!fetchMeshLOD(req.mMeshParams, req.mLOD, req.canRetry()))
+ else if (!fetchMeshLOD(req.mMeshParams, req.mLOD))
{
if (req.canRetry())
{
@@ -1058,7 +1058,7 @@ void LLMeshRepoThread::run()
// failed to load before, wait a bit
incomplete.push_front(req);
}
- else if (!fetchMeshHeader(req.mMeshParams, req.canRetry()))
+ else if (!fetchMeshHeader(req.mMeshParams))
{
if (req.canRetry())
{
@@ -1410,7 +1410,7 @@ LLCore::HttpHandle LLMeshRepoThread::getByteRange(const std::string & url,
}
-bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
+bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
{
LL_PROFILE_ZONE_SCOPED;
if (!mHeaderMutex)
@@ -1491,16 +1491,11 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
<< LL_ENDL;
ret = false;
}
- else if(can_retry)
+ else
{
handler->mHttpHandle = handle;
mHttpRequestSet.insert(handler);
}
- else
- {
- LLMutexLock locker(mMutex);
- mSkinUnavailableQ.emplace_back(mesh_id);
- }
}
else
{
@@ -1767,7 +1762,7 @@ void LLMeshRepoThread::decActiveSkinRequests()
}
//return false if failed to get header
-bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool can_retry)
+bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
{
LL_PROFILE_ZONE_SCOPED;
++LLMeshRepository::sMeshRequestCount;
@@ -1838,7 +1833,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
<< LL_ENDL;
retval = false;
}
- else if (can_retry)
+ else
{
handler->mHttpHandle = handle;
mHttpRequestSet.insert(handler);
@@ -1849,7 +1844,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
}
//return false if failed to get mesh lod.
-bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, bool can_retry)
+bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
{
LL_PROFILE_ZONE_SCOPED;
if (!mHeaderMutex)
@@ -1934,16 +1929,11 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
<< LL_ENDL;
retval = false;
}
- else if (can_retry)
+ else
{
+ // we already made a request, store the handle
handler->mHttpHandle = handle;
mHttpRequestSet.insert(handler);
- // *NOTE: Allowing a re-request, not marking as unavailable. Is that correct?
- }
- else
- {
- LLMutexLock lock(mMutex);
- mUnavailableQ.push_back(LODRequest(mesh_params, lod));
}
}
else
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 2e29daf9ec..294d01f868 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -517,8 +517,8 @@ public:
typedef std::vector<std::pair<const LLVolumeParams&, S32> > lod_list_t;
void loadMeshLODs(const lod_list_t& mesh_vect);
- bool fetchMeshHeader(const LLVolumeParams& mesh_params, bool can_retry = true);
- bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, bool can_retry = true);
+ bool fetchMeshHeader(const LLVolumeParams& mesh_params);
+ bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
EMeshProcessingResult headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size, U32 flags = 0);
EMeshProcessingResult lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size);
bool skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 data_size);
@@ -537,7 +537,7 @@ public:
//send request for skin info, returns true if header info exists
// (should hold onto mesh_id and try again later if header info does not exist)
- bool fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry = true);
+ bool fetchMeshSkinInfo(const LLUUID& mesh_id);
//send request for decomposition, returns true if header info exists
// (should hold onto mesh_id and try again later if header info does not exist)