summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-12 16:19:23 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-12 16:24:04 +0300
commitffd731a3401fcee23eefa0541405d18ee4cd3d84 (patch)
tree9ae8bcbcba36540851e541268255b5c5a8ce2db1 /indra/newview
parentc118c2762302b44fb312752c6d94c384bfda529a (diff)
SL-18131 Increase region cap access count before returning errors
It might be safe to merge mSeedCapAttempts with mHttpResponderID, but for now leaving them separated, if only for making this mechanic clearer.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerregion.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 1aece22a48..f41e924946 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -334,6 +334,23 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
return;
}
+ if (!LLWorld::instanceExists())
+ {
+ LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL;
+ return;
+ }
+
+ regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
+ if (!regionp) //region was removed
+ {
+ LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL;
+ return; // this error condition is not recoverable.
+ }
+
+ impl = regionp->getRegionImplNC();
+
+ ++(impl->mSeedCapAttempts);
+
if (!result.isMap() || result.has("error"))
{
LL_WARNS("AppInit", "Capabilities") << "Malformed response" << LL_ENDL;
@@ -353,23 +370,6 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
// remove the http_result from the llsd
result.erase("http_result");
- if (!LLWorld::instanceExists())
- {
- LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL;
- return;
- }
-
- regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
- if (!regionp) //region was removed
- {
- LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL;
- return; // this error condition is not recoverable.
- }
-
- impl = regionp->getRegionImplNC();
-
- ++(impl->mSeedCapAttempts);
-
if (id != impl->mHttpResponderID) // region is no longer referring to this request
{
LL_WARNS("AppInit", "Capabilities") << "Received results for a stale capabilities request!" << LL_ENDL;