summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 6f6b89ea81..aff959d279 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -285,25 +285,18 @@ void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids, const LLUUID& floate
make_ui_sound("UISndStartIM");
}
-/* AD *TODO: Is this function needed any more?
- I fixed it a bit(added check for canCall), but it appears that it is not used
- anywhere. Maybe it should be removed?
// static
-bool LLAvatarActions::isCalling(const LLUUID &id)
+bool LLAvatarActions::canCall()
{
- if (id.isNull() || !canCall())
- {
- return false;
- }
-
- LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
- return (LLIMModel::getInstance()->findIMSession(session_id) != NULL);
-}*/
+ LLVoiceClient* voice_client = LLVoiceClient::getInstance();
+ return voice_client->voiceEnabled() && voice_client->isVoiceWorking();
+}
-//static
-bool LLAvatarActions::canCall()
+// static
+bool LLAvatarActions::canCallTo(const LLUUID& id)
{
- return LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
+ LLVoiceClient* voice_client = LLVoiceClient::getInstance();
+ return voice_client->voiceEnabled() && voice_client->isVoiceWorking() && voice_client->getVoiceEnabled(id);
}
// static