From 6ebbc5edf6c95f68088577f82b2c1daf73b68205 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 3 Feb 2010 16:15:34 +0200 Subject: =?UTF-8?q?fixed=20EXT-4764=20=E2=80=9CForbid=20connecting=20to=20?= =?UTF-8?q?different=20voice=20channels=20at=20once=E2=80=9D,=20removed=20?= =?UTF-8?q?redundant=20call=20status=20notifications:=20ringing,=20connect?= =?UTF-8?q?ed,=20hang=5Fup,=20unavailable,=20answering;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llvoicechannel.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9d49fb69d6..bb09a18cc3 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -389,13 +389,16 @@ void LLVoiceChannel::setState(EState state) switch(state) { case STATE_RINGING: - LLCallInfoDialog::show("ringing", mNotifyArgs); + //TODO: remove or redirect this call status notification +// LLCallInfoDialog::show("ringing", mNotifyArgs); break; case STATE_CONNECTED: - LLCallInfoDialog::show("connected", mNotifyArgs); + //TODO: remove or redirect this call status notification +// LLCallInfoDialog::show("connected", mNotifyArgs); break; case STATE_HUNG_UP: - LLCallInfoDialog::show("hang_up", mNotifyArgs); + //TODO: remove or redirect this call status notification +// LLCallInfoDialog::show("hang_up", mNotifyArgs); break; default: break; @@ -635,7 +638,8 @@ void LLVoiceChannelGroup::setState(EState state) case STATE_RINGING: if ( !mIsRetrying ) { - LLCallInfoDialog::show("ringing", mNotifyArgs); + //TODO: remove or redirect this call status notification +// LLCallInfoDialog::show("ringing", mNotifyArgs); } doSetState(state); @@ -701,7 +705,8 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status) //skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749) if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) { - LLCallInfoDialog::show("unavailable", mNotifyArgs); + //TODO: remove or redirect this call status notification +// LLCallInfoDialog::show("unavailable", mNotifyArgs); } return; default: @@ -901,7 +906,8 @@ void LLVoiceChannelP2P::setState(EState state) // so provide a special purpose message here if (mReceivedCall && state == STATE_RINGING) { - LLCallInfoDialog::show("answering", mNotifyArgs); + //TODO: remove or redirect this call status notification +// LLCallInfoDialog::show("answering", mNotifyArgs); doSetState(state); return; } -- cgit v1.2.3 From 7403d53e68550159cb56e44cc898e337cf672aae Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Wed, 10 Feb 2010 21:42:39 +0200 Subject: Fixed normal bug EXT-4566 ([BSI] private chat end floater reports incorrectly who ended the call) - Added flag to voicechannel which is true when call is ended by agent. - It is sent to imview via signal and used to properly customize text in outgoing call floater. --HG-- branch : product-engine --- indra/newview/llvoicechannel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') 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()) -- cgit v1.2.3 From a1cfce861ad949cec561d8dbf3d296f8847aa8a6 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 19 Feb 2010 15:08:28 +0200 Subject: Partial fix for major bug EXT-5524 (Crash in LLVoiceClient when quitting viewer without login). - Used call of LLVoiceClient::instanceExists() instead of gVoiceClient in check in LLVoiceChannel destructor to avoid crash when quitting viewer by closing console window before login. So now crash won't happen in LLVoiceClient::removeObserver(). But crash will occur in other destructors later, so further investigation needed. --HG-- branch : product-engine --- indra/newview/llvoicechannel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index dfd67d0c38..fac7fa6a18 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -140,7 +140,10 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess LLVoiceChannel::~LLVoiceChannel() { // Don't use LLVoiceClient::getInstance() here -- this can get called during atexit() time and that singleton MAY have already been destroyed. - if(gVoiceClient) + // Using call of instanceExists() instead of gVoiceClient in check to avoid crash in LLVoiceClient::removeObserver() + // when quitting viewer by closing console window before login (though in case of such quit crash will occur + // later in other destructors anyway). EXT-5524 + if(LLVoiceClient::instanceExists()) { gVoiceClient->removeObserver(this); } -- cgit v1.2.3