diff options
author | Oz Linden <oz@lindenlab.com> | 2018-05-29 11:49:46 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2018-05-29 11:49:46 -0400 |
commit | c18a4cb0117b6e865a72a01465606c67a7e3bf6d (patch) | |
tree | 25abf867eabd03b7804a1e36e9c9af2513636cc7 /indra/newview/llvoicevivox.cpp | |
parent | 77344afa8b39b4c1fcebda4de63998a67fd4debb (diff) | |
parent | c70119ebabc4b06e2b0db02aea8c56e01fbc666e (diff) |
merge changes for 5.1.4-release
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index f6cde58f86..7aac0ff0ed 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -643,7 +643,13 @@ void LLVivoxVoiceClient::voiceControlCoro() { mIsCoroutineActive = true; LLCoros::set_consuming(true); - + + while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + { + LL_INFOS("Voice") << "Suspending voiceControlCoro() due to teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL; + llcoro::suspendUntilTimeout(1.0); + } + do { @@ -665,7 +671,7 @@ void LLVivoxVoiceClient::voiceControlCoro() // and then reconstruct the voice connecion from scratch. if (mRelogRequested) { - while (isGatewayRunning()) + while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) { llcoro::suspendUntilTimeout(1.0); } @@ -1324,7 +1330,7 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) mAudioSession = nextSession; mAudioSessionChanged = true; - if (!mAudioSession->mReconnect) + if (!mAudioSession || !mAudioSession->mReconnect) { mNextAudioSession.reset(); } @@ -1332,16 +1338,19 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) // The old session may now need to be deleted. reapSession(oldSession); - if (!mAudioSession->mHandle.empty()) + if (mAudioSession) { - // Connect to a session by session handle + if (!mAudioSession->mHandle.empty()) + { + // Connect to a session by session handle - sessionMediaConnectSendMessage(mAudioSession); - } - else - { - // Connect to a session by URI - sessionCreateSendMessage(mAudioSession, true, false); + sessionMediaConnectSendMessage(mAudioSession); + } + else + { + // Connect to a session by URI + sessionCreateSendMessage(mAudioSession, true, false); + } } notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); @@ -1409,6 +1418,11 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) LL_INFOS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; if (result.has("session")) { + if (!mAudioSession) + { + LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initialized." << LL_ENDL; + continue; + } if (result.has("handle") && result["handle"] != mAudioSession->mHandle) { LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL; @@ -1750,6 +1764,11 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session) { if (result.has("handle")) { + if (!mAudioSession) + { + LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initiated." << LL_ENDL; + continue; + } if (result["handle"] != mAudioSession->mHandle) { LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL; |