diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-02-14 19:48:17 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-02-14 20:42:30 +0200 |
commit | f06ebd054bfbcf7e3b4c8deb097cbb5064b85366 (patch) | |
tree | c94fb469800332f69e5471faccd0f83da37c2cf8 /indra/llmessage/llcoproceduremanager.cpp | |
parent | 4a3e32e732e5fce6ecc02c15ef8966363f5a8f76 (diff) |
SL-14807 Missed a pool init in unused constructor, additional protections
Diffstat (limited to 'indra/llmessage/llcoproceduremanager.cpp')
-rw-r--r-- | indra/llmessage/llcoproceduremanager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index c50d2bfd41..b94ec541e9 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -140,11 +140,22 @@ LLCoprocedureManager::~LLCoprocedureManager() void LLCoprocedureManager::initializePool(const std::string &poolName) { + poolMap_t::iterator it = mPoolMap.find(poolName); + + if (it != mPoolMap.end()) + { + // Pools are not supposed to be initialized twice + // Todo: ideally restrict init to STATE_FIRST + LL_ERRS() << "Pool is already present " << poolName << LL_ENDL; + return; + } + // Attempt to look up a pool size in the configuration. If found use that std::string keyName = "PoolSize" + poolName; int size = 0; LL_ERRS_IF(poolName.empty(), "CoprocedureManager") << "Poolname must not be empty" << LL_ENDL; + LL_INFOS("CoprocedureManager") << "Initializing pool " << poolName << LL_ENDL; if (mPropertyQueryFn) { |