From 90c9b9e9c5cd9be3a620bf5e1d5b5d233573548c Mon Sep 17 00:00:00 2001 From: paul_productengine Date: Fri, 11 Feb 2011 13:49:10 +0200 Subject: STORM-680 FIXED (Avaline callers are added to the Recent list) - When accepting an avaline call, add a caller to the recent list as AvalineListItem - When adding item to the LLRecentPeople, check whether item with the same phone number exists and delete it if exists. This is need to avoid duplication in the Recent list of the panel People. --- indra/newview/llvoicechannel.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b692093fb9..a71539266d 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -853,7 +853,7 @@ void LLVoiceChannelP2P::activate() } // Add the party to the list of people with which we've recently interacted. - LLRecentPeople::instance().add(mOtherUserID); + addToTheRecentPeopleList(); //Default mic is ON on initiating/joining P2P calls if (!LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) @@ -938,3 +938,25 @@ void LLVoiceChannelP2P::setState(EState state) LLVoiceChannel::setState(state); } + +void LLVoiceChannelP2P::addToTheRecentPeopleList() +{ + bool avaline_call = LLIMModel::getInstance()->findIMSession(mSessionID)->isAvalineSessionType(); + + if (avaline_call) + { + LLSD call_data; + std::string call_number = LLVoiceChannel::getSessionName(); + + call_data["avaline_call"] = true; + call_data["session_id"] = mSessionID; + call_data["call_number"] = call_number; + call_data["date"] = LLDate::now(); + + LLRecentPeople::instance().add(mOtherUserID, call_data); + } + else + { + LLRecentPeople::instance().add(mOtherUserID); + } +} -- cgit v1.2.3 From 9364f995b5815373637c401cb4fa49d7ead7d09a Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 11 May 2011 17:52:05 -0700 Subject: EXP-783 User can accept a call and see end call option in IM window but they are in nearby voice --- indra/newview/llvoicechannel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index a71539266d..b921b7a481 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -412,6 +412,7 @@ void LLVoiceChannel::doSetState(const EState& new_state) { EState old_state = mState; mState = new_state; + if (!mStateChangedCallback.empty()) mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent); } @@ -846,8 +847,11 @@ void LLVoiceChannelP2P::activate() // otherwise answering the call else { - LLVoiceClient::getInstance()->answerInvite(mSessionHandle); - + if (!LLVoiceClient::getInstance()->answerInvite(mSessionHandle)) + { + handleError(ERROR_UNKNOWN); + return; + } // using the session handle invalidates it. Clear it out here so we can't reuse it by accident. mSessionHandle.clear(); } -- cgit v1.2.3 From 039b6baf065a87d747647fb0477c799a9949ebf2 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 13 May 2011 11:01:36 -0700 Subject: EXP-783 User can accept a call and see end call option in IM window but they are in nearby voice --- indra/newview/llvoicechannel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b921b7a481..bd12328a6b 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -849,6 +849,8 @@ void LLVoiceChannelP2P::activate() { if (!LLVoiceClient::getInstance()->answerInvite(mSessionHandle)) { + mCallEndedByAgent = false; + mSessionHandle.clear(); handleError(ERROR_UNKNOWN); return; } -- cgit v1.2.3