summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llimview.cpp8
-rw-r--r--indra/newview/llvoiceclient.cpp12
-rw-r--r--indra/newview/llvoiceclient.h4
-rw-r--r--indra/newview/llvoicevivox.cpp13
-rw-r--r--indra/newview/llvoicevivox.h1
5 files changed, 26 insertions, 12 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index cf83d02b09..247f5b879a 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1847,12 +1847,8 @@ LLCallDialog(payload)
void LLIncomingCallDialog::onLifetimeExpired()
{
- // check whether a call is valid or not
- LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mPayload["session_id"].asUUID());
- if(channelp &&
- (channelp->getState() != LLVoiceChannel::STATE_NO_CHANNEL_INFO) &&
- (channelp->getState() != LLVoiceChannel::STATE_ERROR) &&
- (channelp->getState() != LLVoiceChannel::STATE_HUNG_UP))
+ std::string session_handle = mPayload["session_handle"].asString();
+ if (LLVoiceClient::getInstance()->invitePending(session_handle))
{
// restart notification's timer if call is still valid
mLifetimeTimer.start();
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index e067754e3e..35753178f7 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -385,6 +385,18 @@ void LLVoiceClient::callUser(const LLUUID &uuid)
if (mVoiceModule) mVoiceModule->callUser(uuid);
}
+bool LLVoiceClient::invitePending(std::string &channelHandle)
+{
+ if (mVoiceModule)
+ {
+ return mVoiceModule->invitePending(channelHandle);
+ }
+ else
+ {
+ return false;
+ }
+}
+
bool LLVoiceClient::answerInvite(std::string &channelHandle)
{
if (mVoiceModule)
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index f1a7d3dbec..d4b4f07651 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -176,6 +176,7 @@ public:
//@{
// start a voice channel with the specified user
virtual void callUser(const LLUUID &uuid)=0;
+ virtual bool invitePending(std::string& channelHandle)=0;
virtual bool answerInvite(std::string &channelHandle)=0;
virtual void declineInvite(std::string &channelHandle)=0;
//@}
@@ -324,7 +325,8 @@ static const F32 OVERDRIVEN_POWER_LEVEL;
// NOTE that it will return an empty string if it's in the process of joining a channel.
std::string getCurrentChannel();
// start a voice channel with the specified user
- void callUser(const LLUUID &uuid);
+ void callUser(const LLUUID &uuid);
+ bool invitePending(std::string& channelHandle);
bool answerInvite(std::string &channelHandle);
void declineInvite(std::string &channelHandle);
void leaveChannel(void); // call this on logout or teleport begin
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index f65b87c55b..9d74e7c7ac 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -4582,7 +4582,11 @@ void LLVivoxVoiceClient::endUserIMSession(const LLUUID &uuid)
LL_DEBUGS("Voice") << "Session not found for participant ID " << uuid << LL_ENDL;
}
}
-
+bool LLVivoxVoiceClient::invitePending(std::string &sessionHandle)
+{
+ return(findSession(sessionHandle) != NULL);
+
+}
bool LLVivoxVoiceClient::answerInvite(std::string &sessionHandle)
{
// this is only ever used to answer incoming p2p call invites.
@@ -6217,12 +6221,10 @@ void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string
{
mFriendsListDirty = true;
}
-
// Iterate over all sessions.
for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++)
{
sessionState *session = *iter;
-
// Check for this user as a participant in this session
participantState *participant = session->findParticipantByID(id);
if(participant)
@@ -6249,13 +6251,14 @@ void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string
session->mVoiceInvitePending = false;
gIMMgr->inviteToSession(
- LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID),
+ session->mIMSessionID,
session->mName,
session->mCallerID,
session->mName,
IM_SESSION_P2P_INVITE,
LLIMMgr::INVITATION_TYPE_VOICE,
- session->mHandle);
+ session->mHandle,
+ session->mSIPURI);
}
}
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 10577254e8..39759a399a 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -166,6 +166,7 @@ public:
//@{
// start a voice channel with the specified user
virtual void callUser(const LLUUID &uuid);
+ virtual bool invitePending(std::string &channelHandle);
virtual bool answerInvite(std::string &channelHandle);
virtual void declineInvite(std::string &channelHandle);
//@}