diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-07-26 13:01:13 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-07-30 07:31:05 +0300 |
commit | 7b119c01e0c179bac3dfe8b8c8ee05016099c9aa (patch) | |
tree | e2b5cdad4d9bec3732533b7b98ec9deb05bb33f3 /indra/newview/llvoicechannel.cpp | |
parent | b746e78c78eaba3460b0f49208dc8b864c376d34 (diff) |
viewer-private#255 p2p outgoing calls did not work correctly
Issue:
P2P was catching STATUS_LEFT_CHANNEL meant for nearby chat and adopting
channel info for itself
Solution:
- Moved one of notifyStatusObservers calls so that it would have uri
data instead of firing with no channel info
- Made p2p sessions init with uri data, like it was before webrtc. Which
is used to distinguish observer notifications.
- Removed mAudioSessionChanged. It was unused yet confusing.
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 8681411a98..29817ab03a 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -122,7 +122,13 @@ 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() || (mChannelInfo.isMap() && mChannelInfo.size() == 0)) + if (mChannelInfo.has("channel_uri") + && (!channelInfo.has("channel_uri") || mChannelInfo["channel_uri"] != channelInfo["channel_uri"])) + { + return; + } + if (mChannelInfo.isUndefined() + || (mChannelInfo.isMap() && mChannelInfo.size() <= 1)) // p2p will have uri beforehand { mChannelInfo = channelInfo; } @@ -768,6 +774,11 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID &session_id, mReceivedCall(FALSE), mOutgoingCallInterface(outgoing_call_interface) { + std::string sip_uri = LLVoiceClient::getInstance()->sipURIFromID(other_user_id); + if (!sip_uri.empty()) + { + mChannelInfo["channel_uri"] = sip_uri; + } } void LLVoiceChannelP2P::handleStatusChange(EStatusType type) |