summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-05-13 17:02:49 -0700
committerRichard Linden <none@none>2011-05-13 17:02:49 -0700
commit1e6d1879a01d57e8949add79fa4f3ef5d11c1c43 (patch)
tree1f769d4c8375e23576ecb01457979deeeba34c24 /indra/newview/llvoicechannel.cpp
parente8ede07451c65aea898bc3f58a980b6b0d9af302 (diff)
parent039b6baf065a87d747647fb0477c799a9949ebf2 (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index a71539266d..bd12328a6b 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,13 @@ void LLVoiceChannelP2P::activate()
// otherwise answering the call
else
{
- LLVoiceClient::getInstance()->answerInvite(mSessionHandle);
-
+ if (!LLVoiceClient::getInstance()->answerInvite(mSessionHandle))
+ {
+ mCallEndedByAgent = false;
+ mSessionHandle.clear();
+ handleError(ERROR_UNKNOWN);
+ return;
+ }
// using the session handle invalidates it. Clear it out here so we can't reuse it by accident.
mSessionHandle.clear();
}