summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-04-12 22:07:59 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-04-12 22:07:59 +0300
commit19f356202a9516664c1cacb9b50e9b6e1e072375 (patch)
tree2e3099569987ce4e0b7fd140628776cccd4b5333 /indra/newview/llviewerregion.cpp
parentfd18b0cd7e5d6b047ac482a9ba4926470f573fbf (diff)
STORM-1143 FIXED Server sometimes said region wasn't capable of storing environment settings.
Reason: We tried to check whether the region supports environment settings without making sure that we've actually recieved region capabilities, so the check sometimes failed. Fix: Defer check for the "EnvironmentSettings" capability until we've received the region capabilities.
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r--indra/newview/llviewerregion.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index f6935b0598..04563c9154 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1491,6 +1491,21 @@ bool LLViewerRegion::capabilitiesReceived() const
void LLViewerRegion::setCapabilitiesReceived(bool received)
{
mCapabilitiesReceived = received;
+
+ // Tell interested parties that we've received capabilities,
+ // so that they can safely use getCapability().
+ if (received)
+ {
+ mCapabilitiesReceivedSignal(mRegionID);
+
+ // This is a single-shot signal. Forget callbacks to save resources.
+ mCapabilitiesReceivedSignal.disconnect_all_slots();
+ }
+}
+
+boost::signals2::connection LLViewerRegion::setCapabilitiesReceivedCallback(const caps_received_signal_t::slot_type& cb)
+{
+ return mCapabilitiesReceivedSignal.connect(cb);
}
void LLViewerRegion::logActiveCapabilities() const