summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-04-25 11:06:37 +0800
committerErik Kundiman <erik@megapahit.org>2024-04-25 11:06:37 +0800
commitf7b2c0d7d95ca8609a948a7d11b44534d8ac5249 (patch)
treeb9d80bc52d207acf50ea01b465ab26749ba40f72 /indra/llcommon/llevents.cpp
parentc82295910685c54acf597277e9dac0f70eb40239 (diff)
parentfc71a9c1ed96cb1cb97124e3cceabdfa11e1cc75 (diff)
Merge tag '7.1.6-release'
source for viewer 7.1.6.8745209917
Diffstat (limited to 'indra/llcommon/llevents.cpp')
-rw-r--r--indra/llcommon/llevents.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 1a305ec3dc..70931f3a65 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -211,12 +211,21 @@ void LLEventPumps::clear()
}
}
-void LLEventPumps::reset()
+void LLEventPumps::reset(bool log_pumps)
{
// Reset every known LLEventPump instance. Leave it up to each instance to
// decide what to do with the reset() call.
+ if (log_pumps)
+ {
+ LL_INFOS() << "Resetting " << (S32)mPumpMap.size() << " pumps" << LL_ENDL;
+ }
+
for (PumpMap::value_type& pair : mPumpMap)
{
+ if (log_pumps)
+ {
+ LL_INFOS() << "Resetting pump " << pair.first << LL_ENDL;
+ }
pair.second->reset();
}
}
@@ -373,9 +382,11 @@ std::string LLEventPump::inventName(const std::string& pfx)
void LLEventPump::clear()
{
+ LLMutexLock lock(&mConnectionListMutex);
// Destroy the original LLStandardSignal instance, replacing it with a
// whole new one.
mSignal = std::make_shared<LLStandardSignal>();
+
mConnections.clear();
}
@@ -383,6 +394,7 @@ void LLEventPump::reset()
{
// Resetting mSignal is supposed to disconnect everything on its own
// But due to crash on 'reset' added explicit cleanup to get more data
+ LLMutexLock lock(&mConnectionListMutex);
ConnectionMap::const_iterator iter = mConnections.begin();
ConnectionMap::const_iterator end = mConnections.end();
while (iter!=end)
@@ -407,6 +419,8 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
return LLBoundListener();
}
+ LLMutexLock lock(&mConnectionListMutex);
+
float nodePosition = 1.0;
// if the supplied name is empty we are not interested in the ordering mechanism
@@ -566,8 +580,9 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
return bound;
}
-LLBoundListener LLEventPump::getListener(const std::string& name) const
+LLBoundListener LLEventPump::getListener(const std::string& name)
{
+ LLMutexLock lock(&mConnectionListMutex);
ConnectionMap::const_iterator found = mConnections.find(name);
if (found != mConnections.end())
{
@@ -579,6 +594,7 @@ LLBoundListener LLEventPump::getListener(const std::string& name) const
void LLEventPump::stopListening(const std::string& name)
{
+ LLMutexLock lock(&mConnectionListMutex);
ConnectionMap::iterator found = mConnections.find(name);
if (found != mConnections.end())
{