summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp8
-rw-r--r--indra/newview/llimview.cpp15
2 files changed, 13 insertions, 10 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 00e7dae657..fe0916bf15 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -450,7 +450,8 @@ void LLFloaterIMSessionTab::enableDisableCallBtn()
else
{
// We allow to start call from this state only
- if (mSession->mVoiceChannel->getState() == LLVoiceChannel::STATE_NO_CHANNEL_INFO &&
+ if (mSession->mVoiceChannel &&
+ !mSession->mVoiceChannel->callStarted() &&
LLVoiceClient::instanceExists())
{
LLVoiceClient* client = LLVoiceClient::getInstance();
@@ -494,10 +495,7 @@ void LLFloaterIMSessionTab::onCallButtonClicked()
}
else
{
- LLVoiceChannel::EState channel_state = mSession && mSession->mVoiceChannel ?
- mSession->mVoiceChannel->getState() : LLVoiceChannel::STATE_NO_CHANNEL_INFO;
- // We allow to start call from this state only
- if (channel_state == LLVoiceChannel::STATE_NO_CHANNEL_INFO)
+ if (mSession->mVoiceChannel && !mSession->mVoiceChannel->callStarted())
{
gIMMgr->startCall(mSessionID);
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 136b59f3a6..06cf9919b6 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -390,11 +390,11 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
}
else
{
- LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+ LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+ }
+ }
}
}
-}
- }
if (store_dnd_message)
{
// If in DND mode, allow notification to be stored so upon DND exit
@@ -4178,11 +4178,16 @@ public:
}
if (input["body"]["info"].has("voice_channel_info"))
{
+ // new voice channel info incoming, update and re-activate call
+ // if currently in a call.
LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
if (session)
{
- session->initVoiceChannel(input["body"]["info"]["voice_channel_info"]);
- session->mVoiceChannel->activate();
+ if (session->mVoiceChannel && session->mVoiceChannel->callStarted())
+ {
+ session->initVoiceChannel(input["body"]["info"]["voice_channel_info"]);
+ session->mVoiceChannel->activate();
+ }
}
}
}