summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
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();
}