diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-03-05 18:57:22 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-03-05 18:57:22 -0800 |
commit | 70044b9d2bbc594f0e8f3154feb2dbce77a7af82 (patch) | |
tree | 56d3cee5792ca22c93f496b118a9b8adc1057e30 /indra | |
parent | 2c2529d3c8452c5c6909c6c9bbda6b4259a29b59 (diff) |
The response from the provision account call was being called twice for some reason
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 31 | ||||
-rw-r--r-- | indra/llwebrtc/llwebrtc.h | 2 | ||||
-rw-r--r-- | indra/llwebrtc/llwebrtc_impl.h | 2 | ||||
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 14 |
5 files changed, 33 insertions, 25 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index adde174a74..74af16679a 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -649,21 +649,26 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection() return true; } -void LLWebRTCPeerConnectionImpl::shutdownConnection() +bool LLWebRTCPeerConnectionImpl::shutdownConnection() { - mWebRTCImpl->PostSignalingTask( - [this]() - { - if (mPeerConnection) - { - mPeerConnection->Close(); - mPeerConnection = nullptr; - } - for (auto &observer : mSignalingObserverList) + if (mPeerConnection) + { + mWebRTCImpl->PostSignalingTask( + [this]() { - observer->OnPeerShutDown(); - } - }); + if (mPeerConnection) + { + mPeerConnection->Close(); + mPeerConnection = nullptr; + } + for (auto &observer : mSignalingObserverList) + { + observer->OnPeerShutDown(); + } + }); + return true; + } + return false; } void LLWebRTCPeerConnectionImpl::enableSenderTracks(bool enable) diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index e7effdfbb8..7743ac7ba0 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -138,7 +138,7 @@ class LLWebRTCPeerConnection virtual void unsetSignalingObserver(LLWebRTCSignalingObserver* observer) = 0; virtual bool initializeConnection() = 0; - virtual void shutdownConnection() = 0; + virtual bool shutdownConnection() = 0; virtual void AnswerAvailable(const std::string &sdp) = 0; }; diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index 7146267379..3c182c4b02 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -248,7 +248,7 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnection, void setSignalingObserver(LLWebRTCSignalingObserver *observer) override; void unsetSignalingObserver(LLWebRTCSignalingObserver *observer) override; bool initializeConnection() override; - void shutdownConnection() override; + bool shutdownConnection() override; void AnswerAvailable(const std::string &sdp) override; // diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9303a09402..c3ffbd5426 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -438,12 +438,9 @@ void LLVoiceChannelGroup::activate() } } - //Mic default state is OFF on initiating/joining Ad-Hoc/Group calls - if (LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) - { - LLVoiceClient::getInstance()->inputUserControlState(true); - } - + // Mic default state is OFF on initiating/joining Ad-Hoc/Group calls. It's on for P2P using the AdHoc infra. + + LLVoiceClient::getInstance()->setUserPTTState(mNotifyOnFirstJoin); } } diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 77913ccdea..d593d5aca7 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2395,8 +2395,11 @@ LLVoiceWebRTCConnection::~LLVoiceWebRTCConnection() // by llwebrtc::terminate() on shutdown. return; } - llwebrtc::freePeerConnection(mWebRTCPeerConnection); - mWebRTCPeerConnection = nullptr; + if (mWebRTCPeerConnection) + { + llwebrtc::freePeerConnection(mWebRTCPeerConnection); + mWebRTCPeerConnection = nullptr; + } } void LLVoiceWebRTCConnection::OnIceGatheringState(llwebrtc::LLWebRTCSignalingObserver::IceGatheringState state) @@ -2689,8 +2692,10 @@ void LLVoiceWebRTCConnection::OnVoiceDisconnectionRequestSuccess(const LLSD &res if (mWebRTCPeerConnection) { - mOutstandingRequests++; - mWebRTCPeerConnection->shutdownConnection(); + if (mWebRTCPeerConnection->shutdownConnection()) + { + mOutstandingRequests++; + } } else { @@ -2765,6 +2770,7 @@ void LLVoiceWebRTCConnection::OnVoiceConnectionRequestFailure(std::string url, i } if (retries >= 0) { + LL_WARNS("Voice") << "Failure connecting to voice, retrying." << body << " RESULT: " << result << LL_ENDL; LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost( url, LLCore::HttpRequest::DEFAULT_POLICY_ID, |