From 0cd8ad6ebb6e76bfc04cf6c423b0dc586161c6f7 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 1 Feb 2024 21:53:33 -0800 Subject: Hang up when peer hangs up in ad-hoc driven p2p call --- indra/newview/llvoicewebrtc.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoicewebrtc.h') diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 5ddfbd9ea4..e1a740929b 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -144,8 +144,8 @@ public: // Note that gestures should only fire if this returns true. bool inProximalChannel() override; - void setNonSpatialChannel(const std::string& uri, const std::string& credentials) override { - startAdHocSession(uri, credentials); + void setNonSpatialChannel(const std::string& uri, const std::string& credentials, bool hangup_on_last_leave) override { + startAdHocSession(uri, credentials, hangup_on_last_leave); } bool setSpatialChannel(const std::string &uri, const std::string &credentials) override @@ -388,6 +388,8 @@ public: static bool hasSession(const std::string &sessionID) { return mSessions.find(sessionID) != mSessions.end(); } + bool mHangupOnLastLeave; + protected: sessionState(); std::list mWebRTCConnections; @@ -428,7 +430,7 @@ public: class adhocSessionState : public sessionState { public: - adhocSessionState(const std::string &channelID, const std::string& credentials); + adhocSessionState(const std::string &channelID, const std::string& credentials, bool hangup_on_last_leave); bool isSpatial() override { return false; } bool isEstate() override { return false; } @@ -601,7 +603,7 @@ private: bool startEstateSession(); bool startParcelSession(const std::string& channelID, S32 parcelID); - bool startAdHocSession(const std::string& channelID, const std::string& credentials); + bool startAdHocSession(const std::string& channelID, const std::string& credentials, bool hangup_on_last_leave); void joinSession(const sessionStatePtr_t &session); -- cgit v1.2.3