diff options
author | Roxanne Skelly <roxanne@roxiware.com> | 2024-05-03 15:07:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 15:07:20 -0700 |
commit | 818c8c6deaa755c02b64fb03766ee03d66021968 (patch) | |
tree | 75bf206410bff1c655a15dd80ca05abdab81f581 /indra/newview/llvoicechannel.cpp | |
parent | b425165addbe1c141e050556ff4aa18c8d042dab (diff) | |
parent | cce51e98b188371fa864291f943452188d0e0a94 (diff) |
Merge pull request #1401 from secondlife/webrtc-voice
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index f6658bbaab..f9d4a7e222 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -152,13 +152,16 @@ void LLVoiceChannel::handleStatusChange(EStatusType type) case STATUS_LOGGED_IN: break; case STATUS_LEFT_CHANNEL: - if (callStarted() && !mIgnoreNextSessionLeave && !sSuspended) + if (callStarted() && !sSuspended) { // if forceably removed from channel // update the UI and revert to default channel + // deactivate will set the State to STATE_HUNG_UP + // so when handleStatusChange is called again during + // shutdown callStarted will return false and deactivate + // won't be called again. deactivate(); } - mIgnoreNextSessionLeave = FALSE; break; case STATUS_JOINING: if (callStarted()) @@ -433,7 +436,7 @@ void LLVoiceChannelGroup::activate() // Adding ad-hoc call participants to Recent People List. // If it's an outgoing ad-hoc, we can use mInitialTargetIDs that holds IDs of people we // called(both online and offline) as source to get people for recent (STORM-210). - if (session->isOutgoingAdHoc()) + if (session && session->isOutgoingAdHoc()) { for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it != session->mInitialTargetIDs.end(); ++it) { @@ -470,7 +473,7 @@ void LLVoiceChannelGroup::requestChannelInfo() void LLVoiceChannelGroup::setChannelInfo(const LLSD& channelInfo) { - mChannelInfo = channelInfo; + mChannelInfo = channelInfo; if (mState == STATE_NO_CHANNEL_INFO) { @@ -594,7 +597,14 @@ void LLVoiceChannelGroup::voiceCallCapCoro(std::string url) postData["method"] = "call"; postData["session-id"] = mSessionID; LLSD altParams; - altParams["preferred_voice_server_type"] = gSavedSettings.getString("VoiceServerType"); + std::string preferred_voice_server_type = gSavedSettings.getString("VoiceServerType"); + if (preferred_voice_server_type.empty()) + { + // default to the server type associated with the region we're on. + LLVoiceVersionInfo versionInfo = LLVoiceClient::getInstance()->getVersion(); + preferred_voice_server_type = versionInfo.internalVoiceServerType; + } + altParams["preferred_voice_server_type"] = preferred_voice_server_type; postData["alt_params"] = altParams; LL_INFOS("Voice", "voiceCallCapCoro") << "Generic POST for " << url << LL_ENDL; |