diff options
author | Anchor Linden <anchor@lindenlab.com> | 2018-05-21 16:47:42 -0700 |
---|---|---|
committer | Anchor Linden <anchor@lindenlab.com> | 2018-05-21 16:47:42 -0700 |
commit | 0fdbe7e34df55ac92302b4af38c42d03454d3bc1 (patch) | |
tree | 038c6087299c9096ac7c6606ec45a8339eb0fd72 /indra/newview/llvoicevivox.cpp | |
parent | 3bf89821d9c9777a0f24d89280bd7a7011a7a3df (diff) | |
parent | c70119ebabc4b06e2b0db02aea8c56e01fbc666e (diff) |
Merge
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 6e5a5e3084..838de48308 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); } @@ -1302,7 +1308,7 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) mAudioSession = nextSession; mAudioSessionChanged = true; - if (!mAudioSession->mReconnect) + if (!mAudioSession || !mAudioSession->mReconnect) { mNextAudioSession.reset(); } @@ -1310,16 +1316,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); @@ -1384,6 +1393,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; @@ -1722,6 +1736,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; |