WebRTC clients calling Vivox clients should handle P2P

master
Roxie Linden 2024-05-16 13:34:13 -07:00
parent c6e147ff22
commit cfd358f933
2 changed files with 7 additions and 3 deletions

View File

@ -3393,8 +3393,9 @@ LLUUID LLIMMgr::addSession(
im_floater->reloadMessages();
}
}
LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id);
bool new_session = (LLIMModel::getInstance()->findIMSession(session_id) == NULL);
bool new_session = (session == NULL);
//works only for outgoing ad-hoc sessions
if (new_session &&
@ -3417,6 +3418,7 @@ LLUUID LLIMMgr::addSession(
//Notifies observers that the session was already added
else
{
session->initVoiceChannel(voiceChannelInfo);
std::string session_name = LLIMModel::getInstance()->getName(session_id);
LLIMMgr::getInstance()->notifyObserverSessionActivated(session_id, session_name, other_participant_id);
}

View File

@ -540,9 +540,11 @@ LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const L
LLVoiceVersionInfo versionInfo = LLVoiceClient::getInstance()->getVersion();
voice_server_type = versionInfo.internalVoiceServerType;
}
if (voiceChannelInfo.has("voice_server_type"))
if (voiceChannelInfo.has("voice_server_type") && voiceChannelInfo["voice_server_type"] != voice_server_type)
{
voice_server_type = voiceChannelInfo["voice_server_type"].asString();
// there's a mismatch between what the peer is offering and what our server
// can handle, so downgrade to vivox
voice_server_type = VIVOX_VOICE_SERVER_TYPE;
}
LLVoiceModuleInterface *module = getVoiceModule(voice_server_type);
return dynamic_cast<LLVoiceP2POutgoingCallInterface *>(module);