diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-05-13 18:40:00 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-05-13 18:40:00 -0700 |
commit | 57b99aec74783c323738bd5a130c82c8dbf379c2 (patch) | |
tree | e6f87f4e5e9de3a6ebafc5020daae8214c608a19 /indra/newview/llimview.cpp | |
parent | 39d24e90b983a48335055ed00c7614c0ac0d4d20 (diff) |
Don't overwrite voice channel's credentials when retrieving the channel.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2eb1986558..cf25d1a650 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1823,7 +1823,7 @@ EInstantMessage LLIMModel::getType(const LLUUID& session_id) const return session->mType; } -LLVoiceChannel* LLIMModel::getVoiceChannel( const LLUUID& session_id, const LLSD& voice_channel_info ) const +LLVoiceChannel* LLIMModel::getVoiceChannel( const LLUUID& session_id) const { LLIMSession* session = findIMSession(session_id); if (!session) @@ -1831,14 +1831,6 @@ LLVoiceChannel* LLIMModel::getVoiceChannel( const LLUUID& session_id, const LLSD LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return NULL; } - if (IM_NOTHING_SPECIAL == session->mType || IM_SESSION_P2P_INVITE == session->mType) - { - LLVoiceP2POutgoingCallInterface *outgoingInterface = LLVoiceClient::getInstance()->getOutgoingCallInterface(voice_channel_info); - if ((outgoingInterface != NULL) != (dynamic_cast<LLVoiceChannelP2P *>(session->mVoiceChannel) != NULL)) - { - session->initVoiceChannel(voice_channel_info); - } - } return session->mVoiceChannel; } @@ -3846,8 +3838,12 @@ void LLIMMgr::removeSessionObserver(LLIMSessionObserver *observer) bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction, const LLSD& voice_channel_info) { - LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id, voice_channel_info); + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id); if (!voice_channel) return false; + if (!voice_channel_info.isUndefined()) + { + voice_channel->setChannelInfo(voice_channel_info); + } voice_channel->setCallDirection(direction); voice_channel->activate(); return true; @@ -3855,7 +3851,7 @@ bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection dir bool LLIMMgr::endCall(const LLUUID& session_id) { - LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id, LLSD()); + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id); if (!voice_channel) return false; voice_channel->deactivate(); |