summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
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())
{