summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-04-19 18:52:32 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-04-19 18:52:32 -0700
commitb59ff9edc085f74add1b228fe849ad7e7c31f65f (patch)
tree424fdd7c26aaa79866bae0355ce298a1a1f6c268 /indra
parenteac8043ee50c7418477c0c84d4ec0ec7094673c3 (diff)
For p2p/adhoc/group calls, prefer voice server type based on what's running on the region
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml4
-rw-r--r--indra/newview/llimview.cpp18
-rw-r--r--indra/newview/llvoicechannel.cpp9
3 files changed, 26 insertions, 5 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 0de6db0d65..3ac1844f8e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -15155,13 +15155,13 @@
<key>VoiceServerType</key>
<map>
<key>Comment</key>
- <string>The type of voice server to connect to.</string>
+ <string>The type of voice server to use for group, conference, and p2p calls.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>webrtc</string>
+ <string/>
</map>
<key>WLSkyDetail</key>
<map>
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 9c8fcd3283..b590c462fa 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -425,7 +425,14 @@ void startConferenceCoro(std::string url,
postData["session-id"] = tempSessionId;
postData["params"] = agents;
LLSD altParams;
- altParams["voice_server_type"] = 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;
+ }
+ altParams["voice_server_type"] = voice_server_type;
postData["alt_params"] = altParams;
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData);
@@ -467,7 +474,14 @@ void startP2PVoiceCoro(std::string url, LLUUID sessionID, LLUUID creatorId, LLUU
postData["session-id"] = sessionID;
postData["params"] = otherParticipantId;
LLSD altParams;
- altParams["voice_server_type"] = 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;
+ }
+ altParams["voice_server_type"] = voice_server_type;
postData["alt_params"] = altParams;
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData);
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index f6658bbaab..92b00fe854 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -594,7 +594,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;