From 2128df33ec894d1b5ac1a0e0ad7023fe483abfe3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 16 Nov 2009 17:13:02 +0000 Subject: Be more generous with the voicechannel states that trigger the Calling popup. Huh, the voicechannel state machine isn't much of a state machine. --- 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 ae32ec7d11..871f302c3d 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -873,6 +873,8 @@ void LLVoiceChannelP2P::setState(EState state) // *HACK: Open/close the call window if needed. toggleCallWindowIfNeeded(state); + llinfos << "CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl; + if (mReceivedCall) // incoming call { // you only "answer" voice invites in p2p mode @@ -889,7 +891,8 @@ void LLVoiceChannelP2P::setState(EState state) mCallDialogPayload["session_id"] = mSessionID; mCallDialogPayload["session_name"] = mSessionName; mCallDialogPayload["other_user_id"] = mOtherUserID; - if (state == STATE_RINGING) + if (state == STATE_RINGING || + state == STATE_CALL_STARTED) { // *HACK: open outgoing call floater if needed, might be better done elsewhere. // *TODO: should move this squirrelly ui-fudging crap into LLOutgoingCallDialog itself -- cgit v1.2.3 From 5b6002f5cc9bd209372fb7453728ec3bd4842430 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 16 Nov 2009 17:36:07 +0000 Subject: speculative attempt at a 'no answer' dialog state, and some more debug spew. --- indra/newview/llvoicechannel.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 871f302c3d..9e48e80ca0 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -747,6 +747,8 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string void LLVoiceChannelP2P::handleStatusChange(EStatusType type) { + llinfos << "CALL CHANNEL STATUS CHANGE: " << type << llendl; + // status updates switch(type) { @@ -904,6 +906,7 @@ void LLVoiceChannelP2P::setState(EState state) ocd->getChild("calling")->setVisible(true); ocd->getChild("leaving")->setVisible(true); ocd->getChild("connecting")->setVisible(false); + ocd->getChild("noanswer")->setVisible(false); } } } @@ -915,16 +918,29 @@ void LLVoiceChannelP2P::setState(EState state) ocd->getChild("calling")->setVisible(false); ocd->getChild("leaving")->setVisible(false); ocd->getChild("connecting")->setVisible(true); + ocd->getChild("noanswer")->setVisible(false); } }*/ + else if (state == STATE_ERROR) + { + LLOutgoingCallDialog *ocd = dynamic_cast(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->getChild("calling")->setVisible(false); + ocd->getChild("leaving")->setVisible(false); + ocd->getChild("connecting")->setVisible(false); + ocd->getChild("noanswer")->setVisible(true); + } + } else if (state == STATE_HUNG_UP || state == STATE_CONNECTED) { - LLOutgoingCallDialog *ocd = dynamic_cast(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->closeFloater(); - } + // hide popup + LLOutgoingCallDialog *ocd = dynamic_cast(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->closeFloater(); + } } } -- cgit v1.2.3 From b42b421d25f3b3a7ea4f571388acb64f98e1f51d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 16 Nov 2009 17:53:17 +0000 Subject: better debug spew yes, it looks like we really don't get much detail from llvoiceclient, it's not just llvoicechannel that's dumbed-down! --- indra/newview/llvoicechannel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9e48e80ca0..7036d9ebb6 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -747,7 +747,7 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string void LLVoiceChannelP2P::handleStatusChange(EStatusType type) { - llinfos << "CALL CHANNEL STATUS CHANGE: " << type << llendl; + llinfos << "P2P CALL CHANNEL STATUS CHANGE: incoming=" << int(mReceivedCall) << " newstatus=" << LLVoiceClientStatusObserver::status2string(type) << " (mState=" << mState << ")" << llendl; // status updates switch(type) @@ -875,7 +875,7 @@ void LLVoiceChannelP2P::setState(EState state) // *HACK: Open/close the call window if needed. toggleCallWindowIfNeeded(state); - llinfos << "CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl; + llinfos << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl; if (mReceivedCall) // incoming call { -- cgit v1.2.3 From 4f35650f0427f6d6db10da0058d2850c30f98904 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Tue, 17 Nov 2009 17:23:07 +0200 Subject: Fixed critical bug EXT-2469 "Viewer crashes in the Floater Call". - Re-factored Floater Call initialization and destruction logic. - Removing voice channel participants observer when call ends. --HG-- branch : product-engine --- indra/newview/llvoicechannel.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index ae32ec7d11..21054dacd0 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llfloatercall.h" #include "llfloaterreg.h" #include "llimview.h" #include "llnotifications.h" @@ -408,9 +409,14 @@ void LLVoiceChannel::doSetState(const EState& new_state) void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) { + LLFloaterCall* floater = dynamic_cast(LLFloaterReg::getInstance("voice_call", mSessionID)); + if (!floater) + return; + if (state == STATE_CONNECTED) { - LLFloaterReg::showInstance("voice_call", mSessionID); + floater->init(mSessionID); + floater->openFloater(mSessionID); } // By checking that current state is CONNECTED we make sure that the call window // has been shown, hence there's something to hide. This helps when user presses @@ -418,7 +424,8 @@ void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) // *TODO: move this check to LLFloaterCall? else if (state == STATE_HUNG_UP && mState == STATE_CONNECTED) { - LLFloaterReg::hideInstance("voice_call", mSessionID); + floater->reset(); + floater->closeFloater(); } } -- cgit v1.2.3