summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-05-13 18:40:00 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-05-13 18:40:00 -0700
commit57b99aec74783c323738bd5a130c82c8dbf379c2 (patch)
treee6f87f4e5e9de3a6ebafc5020daae8214c608a19
parent39d24e90b983a48335055ed00c7614c0ac0d4d20 (diff)
Don't overwrite voice channel's credentials when retrieving the channel.
-rw-r--r--indra/newview/llimview.cpp18
-rw-r--r--indra/newview/llimview.h2
-rw-r--r--indra/newview/llvoicevivox.cpp3
3 files changed, 10 insertions, 13 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();
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 16444a6755..e4e42e8f0d 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -287,7 +287,7 @@ public:
* Get voice channel for the session specified by session_id
* Returns NULL if the session does not exist
*/
- LLVoiceChannel* getVoiceChannel(const LLUUID& session_id, const LLSD& voice_channel_info = LLSD()) const;
+ LLVoiceChannel* getVoiceChannel(const LLUUID& session_id) const;
/**
* Get im speaker manager for the session specified by session_id
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 6bbb2f24a6..fe9df190c1 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -6363,7 +6363,8 @@ void LLVivoxVoiceClient::predAvatarNameResolution(const LLVivoxVoiceClient::sess
session->mCallerID,
session->mName,
IM_SESSION_P2P_INVITE,
- LLIMMgr::INVITATION_TYPE_VOICE);
+ LLIMMgr::INVITATION_TYPE_VOICE,
+ session->getVoiceChannelInfo());
}
}
}