diff options
| author | Roxie Linden <roxie@lindenlab.com> | 2024-06-26 12:53:49 -0700 | 
|---|---|---|
| committer | Roxie Linden <roxie@lindenlab.com> | 2024-06-26 12:53:49 -0700 | 
| commit | 0f2bb1bd8307a0802a6e24c7eb50f6a0082edea4 (patch) | |
| tree | 0049a6812dbfe3816b1c043a95ee5fb665058568 /indra/newview | |
| parent | 39f0da7ab623ee99106058deb1d0c6a3295b567f (diff) | |
Make the webrtc viewer work for vivox adhoc/group calls.
There was an issue on the release grid where old-style credentials
were being sent over and the webrtc viewer wasn't dealing with them properly.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llimview.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llvoicechannel.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llvoicevivox.cpp | 18 | 
3 files changed, 19 insertions, 13 deletions
| diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2978de6a22..d3f013c67c 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3853,7 +3853,7 @@ bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection dir  {      LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id);      if (!voice_channel) return false; -    if (!voice_channel_info.isUndefined()) +    if (voice_channel_info.isDefined() && voice_channel_info.isMap() && voice_channel_info.size() > 0)      {          voice_channel->setChannelInfo(voice_channel_info);      } diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index f6556b7128..8681411a98 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -96,7 +96,7 @@ void LLVoiceChannel::setChannelInfo(const LLSD &channelInfo)      if (mState == STATE_NO_CHANNEL_INFO)      { -        if (mChannelInfo.isUndefined()) +        if (mChannelInfo.isUndefined() || !mChannelInfo.isMap() || mChannelInfo.size() == 0)          {              LLNotificationsUtil::add("VoiceChannelJoinFailed", mNotifyArgs);              LL_WARNS("Voice") << "Received empty channel info for channel " << mSessionName << LL_ENDL; @@ -122,7 +122,7 @@ void LLVoiceChannel::onChange(EStatusType type, const LLSD& channelInfo, bool pr  {      LL_DEBUGS("Voice") << "Incoming channel info: " << channelInfo << LL_ENDL;      LL_DEBUGS("Voice") << "Current channel info: " << mChannelInfo << LL_ENDL; -    if (mChannelInfo.isUndefined()) +    if (mChannelInfo.isUndefined() || (mChannelInfo.isMap() && mChannelInfo.size() == 0))      {          mChannelInfo = channelInfo;      } @@ -477,7 +477,7 @@ void LLVoiceChannelGroup::setChannelInfo(const LLSD& channelInfo)      if (mState == STATE_NO_CHANNEL_INFO)      { -        if(!mChannelInfo.isUndefined()) +        if(mChannelInfo.isDefined() && mChannelInfo.isMap())          {              setState(STATE_READY); @@ -676,9 +676,9 @@ void LLVoiceChannelProximal::activate()          // we're connected to a non-spatial channel, so disconnect.          LLVoiceClient::getInstance()->leaveNonSpatialChannel();      } +      LLVoiceClient::getInstance()->activateSpatialChannel(true);      LLVoiceChannel::activate(); -  }  void LLVoiceChannelProximal::onChange(EStatusType type, const LLSD& channelInfo, bool proximal) @@ -751,7 +751,7 @@ void LLVoiceChannelProximal::deactivate()      {          setState(STATE_HUNG_UP);      } - +    LLVoiceClient::getInstance()->removeObserver(this);      LLVoiceClient::getInstance()->activateSpatialChannel(false);  } @@ -907,7 +907,7 @@ void LLVoiceChannelP2P::setChannelInfo(const LLSD& channel_info)      }      mReceivedCall = TRUE; -    if (!channel_info.isUndefined()) +    if (channel_info.isDefined() && channel_info.isMap())      {          mIncomingCallInterface = LLVoiceClient::getInstance()->getIncomingCallInterface(channel_info);      } diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 3554933a52..1833aeb54f 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5105,25 +5105,31 @@ void LLVivoxVoiceClient::processChannels(bool process)  bool LLVivoxVoiceClient::isCurrentChannel(const LLSD &channelInfo)  { -    if (!mProcessChannels || (channelInfo["voice_server_type"].asString() != VIVOX_VOICE_SERVER_TYPE)) +    if (!mProcessChannels || (channelInfo.has("voice_server_type") && channelInfo["voice_server_type"].asString() != VIVOX_VOICE_SERVER_TYPE))      {          return false;      } -    if (mAudioSession) +    // favor the next audio session, as that's the one we're bringing up. +    sessionStatePtr_t session = mNextAudioSession; +    if (!session) +    { +        session = mAudioSession; +    } +    if (session)      {          if (!channelInfo["session_handle"].asString().empty())          { -            return mAudioSession->mHandle == channelInfo["session_handle"].asString(); +            return session->mHandle == channelInfo["session_handle"].asString();          } -        return channelInfo["channel_uri"].asString() == mAudioSession->mSIPURI; +        return channelInfo["channel_uri"].asString() == session->mSIPURI;      }      return false;  }  bool LLVivoxVoiceClient::compareChannels(const LLSD& channelInfo1, const LLSD& channelInfo2)  { -    return (channelInfo1["voice_server_type"] == VIVOX_VOICE_SERVER_TYPE) && -           (channelInfo1["voice_server_type"] == channelInfo2["voice_server_type"]) && +    return (!channelInfo1.has("voice_server_type") || (channelInfo1["voice_server_type"] == VIVOX_VOICE_SERVER_TYPE)) && +           (!channelInfo2.has("voice_server_type") || (channelInfo2["voice_server_type"] == VIVOX_VOICE_SERVER_TYPE)) &&             (channelInfo1["channel_uri"] == channelInfo2["channel_uri"]);  } | 
