diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llvoicechannel.cpp | 38 | 
1 files changed, 22 insertions, 16 deletions
| diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 03e0f99727..bb2965b9ce 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -873,26 +873,32 @@ void LLVoiceChannelP2P::setState(EState state)  	// *HACK: Open/close the call window if needed.  	toggleCallWindowIfNeeded(state); -	// *HACK: open outgoing call floater if needed, might be better done elsewhere. -	mCallDialogPayload["session_id"] = mSessionID; -	mCallDialogPayload["session_name"] = mSessionName; -	mCallDialogPayload["other_user_id"] = mOtherUserID; -	if (!mReceivedCall && state == STATE_RINGING) -	{ -		llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; -		if (!mSessionName.empty()) +	if (mReceivedCall) // incoming call +	{ +		// you only "answer" voice invites in p2p mode +		// so provide a special purpose message here +		if (mReceivedCall && state == STATE_RINGING)  		{ -			LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE); +			gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); +			doSetState(state); +			return;  		}  	} - -	// you only "answer" voice invites in p2p mode -	// so provide a special purpose message here -	if (mReceivedCall && state == STATE_RINGING) +	else // outgoing call  	{ -		gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); -		doSetState(state); -		return; +		mCallDialogPayload["session_id"] = mSessionID; +		mCallDialogPayload["session_name"] = mSessionName; +		mCallDialogPayload["other_user_id"] = mOtherUserID; +		if (state == STATE_RINGING) +		{ +			// *HACK: open outgoing call floater if needed, might be better done elsewhere. +			llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; +			if (!mSessionName.empty()) +			{ +				LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE); +			} +		}  	} +  	LLVoiceChannel::setState(state);  } | 
