summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-02-11 14:53:11 +0000
committerAimee Linden <aimee@lindenlab.com>2010-02-11 14:53:11 +0000
commitd7e8a30a5a9bd416254f83e20054c73edf3f890d (patch)
tree43a156ca397913ce7da626ac9c002e1036f2460c /indra/newview/llvoicechannel.cpp
parent898e9da1af113704e2e10328dfa5396deb24eb30 (diff)
parent1b8a7fdeaab78216baad1f916e9788c0b90287b3 (diff)
merge with ssh://hg.lindenlab.com/viewer/viewer-2-0
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index bb09a18cc3..dfd67d0c38 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -122,7 +122,8 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess
mState(STATE_NO_CHANNEL_INFO),
mSessionName(session_name),
mCallDirection(OUTGOING_CALL),
- mIgnoreNextSessionLeave(FALSE)
+ mIgnoreNextSessionLeave(FALSE),
+ mCallEndedByAgent(false)
{
mNotifyArgs["VOICE_CHANNEL_NAME"] = mSessionName;
@@ -412,7 +413,7 @@ void LLVoiceChannel::doSetState(const EState& new_state)
EState old_state = mState;
mState = new_state;
if (!mStateChangedCallback.empty())
- mStateChangedCallback(old_state, mState, mCallDirection);
+ mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent);
}
//static
@@ -779,7 +780,8 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type)
}
else
{
- // other user hung up
+ // other user hung up, so we didn't end the call
+ mCallEndedByAgent = false;
}
deactivate();
}
@@ -810,6 +812,9 @@ void LLVoiceChannelP2P::activate()
{
if (callStarted()) return;
+ //call will be counted as ended by user unless this variable is changed in handleStatusChange()
+ mCallEndedByAgent = true;
+
LLVoiceChannel::activate();
if (callStarted())