summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicewebrtc.h
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-09-13 11:51:36 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-22 23:11:33 -0800
commit5f267412f6f110a87583b547d27744d8760fc2ef (patch)
treeeac9d33e97dbe3645d645da3dda3d5ac468b708f /indra/newview/llvoicewebrtc.h
parenta974a1517901eb0a93099853a89bf55904737cec (diff)
Add some thread safety
Diffstat (limited to 'indra/newview/llvoicewebrtc.h')
-rw-r--r--indra/newview/llvoicewebrtc.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h
index 061e00581e..f4e2ac0b7f 100644
--- a/indra/newview/llvoicewebrtc.h
+++ b/indra/newview/llvoicewebrtc.h
@@ -655,10 +655,13 @@ private:
int mVoiceControlState;
LLMutex mVoiceStateMutex;
- void setVoiceControlState(int new_voice_control_state)
+ void setVoiceControlStateUnless(int new_voice_control_state, int unless=-1)
{
LLMutexLock lock(&mVoiceStateMutex);
- mVoiceControlState = new_voice_control_state;
+ if (mVoiceControlState != unless)
+ {
+ mVoiceControlState = new_voice_control_state;
+ }
}
int getVoiceControlState()
{