summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-29 21:00:25 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-29 21:00:25 +0300
commit3f31901640b11740da43b23f0d9902407ee9313d (patch)
treee9e8671a242831d736580423913603627e25775b /indra/llmessage
parent8ce21268a1723738aaded551812d71e5ec29c707 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge master (DRTVWR-515) into DRTVWR-516-maint
# Conflicts: # autobuild.xml # doc/contributions.txt # indra/llcommon/llcoros.cpp # indra/llmessage/llcoproceduremanager.cpp # indra/newview/llfloaterfixedenvironment.cpp # indra/newview/llfloaterimsessiontab.cpp
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llassetstorage.h2
-rw-r--r--indra/llmessage/llavatarnamecache.cpp50
-rw-r--r--indra/llmessage/llcoproceduremanager.cpp6
-rw-r--r--indra/llmessage/llcoproceduremanager.h3
4 files changed, 38 insertions, 23 deletions
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index c799d8eefc..7e4572f50f 100644
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -262,7 +262,7 @@ public:
virtual void logAssetStorageInfo() = 0;
- void checkForTimeouts();
+ virtual void checkForTimeouts();
void getEstateAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id,
const LLUUID &asset_id, LLAssetType::EType atype, EstateAssetType etype,
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 7380df041d..c67f59bc0c 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -145,10 +145,10 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU
}
LLSD httpResults;
+ bool success = true;
try
{
- bool success = true;
LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("NameCache", sHttpPolicy);
LLSD results = httpAdapter.getAndSuspend(sHttpRequest, url);
@@ -163,35 +163,47 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU
else
{
httpResults = results["http_result"];
- success = httpResults["success"].asBoolean();
- if (!success)
+ if (!httpResults.isMap())
{
- LL_WARNS("AvNameCache") << "Error result from LLCoreHttpUtil::HttpCoroHandler. Code "
- << httpResults["status"] << ": '" << httpResults["message"] << "'" << LL_ENDL;
+ success = false;
+ LL_WARNS("AvNameCache") << " Invalid http_result returned from LLCoreHttpUtil::HttpCoroHandler." << LL_ENDL;
}
- }
-
- if (!success)
- { // on any sort of failure add dummy records for any agent IDs
- // in this request that we do not have cached already
- std::vector<LLUUID>::const_iterator it = agentIds.begin();
- for ( ; it != agentIds.end(); ++it)
+ else
{
- const LLUUID& agent_id = *it;
- LLAvatarNameCache::getInstance()->handleAgentError(agent_id);
+ success = httpResults["success"].asBoolean();
+ if (!success)
+ {
+ LL_WARNS("AvNameCache") << "Error result from LLCoreHttpUtil::HttpCoroHandler. Code "
+ << httpResults["status"] << ": '" << httpResults["message"] << "'" << LL_ENDL;
+ }
}
- return;
}
- LLAvatarNameCache::getInstance()->handleAvNameCacheSuccess(results, httpResults);
+ if (LLAvatarNameCache::instanceExists())
+ {
+ if (!success)
+ { // on any sort of failure add dummy records for any agent IDs
+ // in this request that we do not have cached already
+ std::vector<LLUUID>::const_iterator it = agentIds.begin();
+ for (; it != agentIds.end(); ++it)
+ {
+ const LLUUID& agent_id = *it;
+ LLAvatarNameCache::getInstance()->handleAgentError(agent_id);
+ }
+ return;
+ }
+ LLAvatarNameCache::getInstance()->handleAvNameCacheSuccess(results, httpResults);
+ }
}
catch (...)
{
LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << LLCoros::getName()
- << "('" << url << "', " << agentIds.size()
- << " http result: " << httpResults.asString()
- << " Agent Ids)"));
+ << "('" << url << "', "
+ << agentIds.size() << "Agent Ids,"
+ << " http result: " << S32(success)
+ << " has response: " << S32(httpResults.size())
+ << ")"));
throw;
}
}
diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp
index b94ec541e9..be014e7b1e 100644
--- a/indra/llmessage/llcoproceduremanager.cpp
+++ b/indra/llmessage/llcoproceduremanager.cpp
@@ -47,7 +47,7 @@ static const std::map<std::string, U32> DefaultPoolSizes{
};
static const U32 DEFAULT_POOL_SIZE = 5;
-static const U32 DEFAULT_QUEUE_SIZE = 4096;
+const U32 LLCoprocedureManager::DEFAULT_QUEUE_SIZE = 4096;
//=========================================================================
class LLCoprocedurePool: private boost::noncopyable
@@ -298,7 +298,7 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
mPoolSize(size),
mActiveCoprocsCount(0),
mPending(0),
- mPendingCoprocs(boost::make_shared<CoprocQueue_t>(DEFAULT_QUEUE_SIZE)),
+ mPendingCoprocs(boost::make_shared<CoprocQueue_t>(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),
mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mCoroMapping()
{
@@ -349,7 +349,7 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
mCoroMapping.insert(CoroAdapterMap_t::value_type(pooledCoro, httpAdapter));
}
- LL_INFOS("CoProcMgr") << "Created coprocedure pool named \"" << mPoolName << "\" with " << size << " items, queue max " << DEFAULT_QUEUE_SIZE << LL_ENDL;
+ LL_INFOS("CoProcMgr") << "Created coprocedure pool named \"" << mPoolName << "\" with " << size << " items, queue max " << LLCoprocedureManager::DEFAULT_QUEUE_SIZE << LL_ENDL;
}
LLCoprocedurePool::~LLCoprocedurePool()
diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h
index d6973996a9..2d460826ff 100644
--- a/indra/llmessage/llcoproceduremanager.h
+++ b/indra/llmessage/llcoproceduremanager.h
@@ -91,6 +91,9 @@ private:
SettingQuery_t mPropertyQueryFn;
SettingUpdate_t mPropertyDefineFn;
+
+public:
+ static const U32 DEFAULT_QUEUE_SIZE;
};
#endif