summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-05-14 18:24:01 +0300
committermaxim_productengine <mnikolenko@productengine.com>2018-05-14 18:24:01 +0300
commit7a2e3dd1bc11852fcddb185dd6da25460d4942c8 (patch)
treef67d8497634a769cb1416e29eb6f9ceb38cd6ff1 /indra
parentff521c67ff5580e1df2e01ec7ff511cad311f5f1 (diff)
MAINT-8611 Prevent object media updates if media preference is disabled
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmediadataclient.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index bd8f464acd..bc45eb6d3a 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -27,6 +27,7 @@
#include "llviewerprecompiledheaders.h"
#include "llmediadataclient.h"
+#include "llviewercontrol.h"
#if LL_MSVC
// disable boost::lexical_cast warning
@@ -718,6 +719,13 @@ bool LLObjectMediaDataClient::compareRequestScores(const Request::ptr_t &o1, con
void LLObjectMediaDataClient::enqueue(Request::ptr_t request)
{
+ static LLCachedControl<bool> audio_streaming_enabled(gSavedSettings, "AudioStreamingMedia", true);
+ if (!audio_streaming_enabled)
+ {
+ LL_DEBUGS("LLMediaDataClient") << "not queueing request when Media is disabled " << *request << LL_ENDL;
+ return;
+ }
+
if(request->isDead())
{
LL_DEBUGS("LLMediaDataClient") << "not queueing dead request " << *request << LL_ENDL;
@@ -978,6 +986,13 @@ const char *LLObjectMediaNavigateClient::getCapabilityName() const
void LLObjectMediaNavigateClient::enqueue(Request::ptr_t request)
{
+ static LLCachedControl<bool> audio_streaming_enabled(gSavedSettings, "AudioStreamingMedia", true);
+ if (!audio_streaming_enabled)
+ {
+ LL_DEBUGS("LLMediaDataClient") << "not queueing request when Media is disabled " << *request << LL_ENDL;
+ return;
+ }
+
if(request->isDead())
{
LL_DEBUGS("LLMediaDataClient") << "not queuing dead request " << *request << LL_ENDL;