diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-04-20 00:26:39 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-04-20 00:26:39 -0700 |
commit | 1a1af1ce2989d384c5dabf4dce9bc150a69b02c1 (patch) | |
tree | 7be237f1ea34350319732431737e87ebb1127552 /indra/newview/llvoiceclient.cpp | |
parent | 784dae7e6a085577df91845466c910b2bcbf7d81 (diff) |
Adjust logic for determine what voice server type to use.
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 9dbf469ca8..6eadc3892e 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -538,12 +538,18 @@ LLVoiceP2PIncomingCallInterfacePtr LLVoiceClient::getIncomingCallInterface(const // outgoing calls LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const LLSD& voiceChannelInfo) { - std::string voiceServerType = gSavedSettings.getString("VoiceServerType"); + std::string voice_server_type = gSavedSettings.getString("VoiceServerType"); + if (voice_server_type.empty()) + { + // default to the server type associated with the region we're on. + LLVoiceVersionInfo versionInfo = LLVoiceClient::getInstance()->getVersion(); + voice_server_type = versionInfo.internalVoiceServerType; + } if (voiceChannelInfo.has("voice_server_type")) { - voiceServerType = voiceChannelInfo["voice_server_type"].asString(); + voice_server_type = voiceChannelInfo["voice_server_type"].asString(); } - LLVoiceModuleInterface *module = getVoiceModule(voiceServerType); + LLVoiceModuleInterface *module = getVoiceModule(voice_server_type); return dynamic_cast<LLVoiceP2POutgoingCallInterface *>(module); } |