From b59ff9edc085f74add1b228fe849ad7e7c31f65f Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 19 Apr 2024 18:52:32 -0700 Subject: For p2p/adhoc/group calls, prefer voice server type based on what's running on the region --- indra/newview/llimview.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') 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); -- cgit v1.2.3 From 1a1af1ce2989d384c5dabf4dce9bc150a69b02c1 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Sat, 20 Apr 2024 00:26:39 -0700 Subject: Adjust logic for determine what voice server type to use. --- indra/newview/llimview.cpp | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b590c462fa..efa8bd2109 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -424,17 +424,6 @@ void startConferenceCoro(std::string url, postData["method"] = "start conference"; postData["session-id"] = tempSessionId; postData["params"] = agents; - LLSD altParams; - 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); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; @@ -473,17 +462,6 @@ void startP2PVoiceCoro(std::string url, LLUUID sessionID, LLUUID creatorId, LLUU postData["method"] = "start p2p voice"; postData["session-id"] = sessionID; postData["params"] = otherParticipantId; - LLSD altParams; - 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); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; @@ -2133,7 +2111,7 @@ bool LLIMModel::sendStartSession( //we also need to wait for reply from the server in case of ad-hoc chat (we'll get new session id) return true; } - else if ((dialog == IM_SESSION_P2P_INVITE) || (dialog == IM_NOTHING_SPECIAL)) + else if (p2p_as_adhoc_call && ((dialog == IM_SESSION_P2P_INVITE) || (dialog == IM_NOTHING_SPECIAL))) { LLViewerRegion *region = gAgent.getRegion(); if (region) -- cgit v1.2.3