diff options
author | Roxie Linden <roxie@lindenlab.com> | 2023-12-25 17:41:48 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-08 18:34:02 -0800 |
commit | 3f2d52e5df0d31560cedb6748e2bf4134933be50 (patch) | |
tree | 9a1b9e3e0c220f6ce0ff2250a8b00802139b142e /indra | |
parent | c393c3bd2b6be38366c4191a190f69e700b6b822 (diff) |
Fix enable/disable issue when connecting to multiple regions
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 305868e415..0c15dbccaf 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -362,6 +362,7 @@ void LLWebRTCVoiceClient::cleanUp() mNextAudioSession.reset(); mAudioSession.reset(); + mNeighboringRegions.clear(); sessionState::for_each(boost::bind(predShutdownSession, _1)); LL_DEBUGS("Voice") << "exiting" << LL_ENDL; } @@ -510,7 +511,6 @@ void LLWebRTCVoiceClient::voiceConnectionCoro() { continue; } - mNeighboringRegions.insert(regionp->getRegionID()); bool voiceEnabled = mVoiceEnabled && regionp->isVoiceEnabled(); // check to see if parcel changed. std::string channelID = "Estate"; @@ -1215,6 +1215,7 @@ bool LLWebRTCVoiceClient::setSpatialChannel( } else { + mNeighboringRegions.insert(gAgent.getRegion()->getRegionID()); return switchChannel(uri, parcel_local_id == INVALID_PARCEL_ID ? sessionState::SESSION_TYPE_ESTATE : sessionState::SESSION_TYPE_PARCEL, parcel_local_id); } } @@ -1535,10 +1536,7 @@ void LLWebRTCVoiceClient::updatePosition(void) enforceTether(); - if (mSpatialCoordsDirty) - { - updateNeighboringRegions(); - } + updateNeighboringRegions(); } } @@ -2843,7 +2841,7 @@ bool LLVoiceWebRTCConnection::breakVoiceConnection(bool corowait) if (!regionp || !regionp->capabilitiesReceived()) { LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL; - setVoiceConnectionState(VOICE_STATE_WAIT_FOR_EXIT); + setVoiceConnectionState(VOICE_STATE_SESSION_EXIT); return false; } |