diff options
| author | Roxie Linden <roxie@lindenlab.com> | 2024-03-07 23:13:11 -0800 | 
|---|---|---|
| committer | Roxie Linden <roxie@lindenlab.com> | 2024-03-07 23:13:11 -0800 | 
| commit | 42c7a335f840acf1b927b1ed6c8e06a6f00534d0 (patch) | |
| tree | 30fb306e57196ace15b4a035266e561642ffc9d9 | |
| parent | 425f089ffcfa715b4e85dd65c91bec1b8e2beb10 (diff) | |
Fix issue with spatial and p2p being up at the same time
Also, fix issue with voice still happening in parcels where voice is
disabled.
| -rw-r--r-- | indra/newview/llvoiceclient.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 47 | 
2 files changed, 27 insertions, 30 deletions
| diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index b642c43f34..9f99549829 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -400,14 +400,8 @@ BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id)  BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id)  { -	if (mSpatialVoiceModule)  -	{ -		return mSpatialVoiceModule->isSessionCallBackPossible(id); -	} -	else -	{ -		return FALSE; -	}	 +	// we don't support PSTN calls anymore.  (did we ever?) +    return TRUE;  }  //---------------------------------------------- diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index d593d5aca7..fe4c4129c5 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -523,33 +523,36 @@ LLWebRTCVoiceClient::adhocSessionState::adhocSessionState(const std::string &cha  bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates()  { -    // Estate voice requires connection to neighboring regions. -    std::set<LLUUID> neighbor_ids = LLWebRTCVoiceClient::getInstance()->getNeighboringRegions(); - -    for (auto& connection : mWebRTCConnections) +    if (!mShuttingDown)      { -        boost::shared_ptr<LLVoiceWebRTCSpatialConnection> spatialConnection = -            boost::static_pointer_cast<LLVoiceWebRTCSpatialConnection>(connection); +        // Estate voice requires connection to neighboring regions. +        std::set<LLUUID> neighbor_ids = LLWebRTCVoiceClient::getInstance()->getNeighboringRegions(); -        LLUUID regionID = spatialConnection.get()->getRegionID(); -      -        if (neighbor_ids.find(regionID) == neighbor_ids.end()) +        for (auto &connection : mWebRTCConnections)          { -            // shut down connections to neighbors that are too far away. -            spatialConnection.get()->shutDown(); +            boost::shared_ptr<LLVoiceWebRTCSpatialConnection> spatialConnection = +                boost::static_pointer_cast<LLVoiceWebRTCSpatialConnection>(connection); + +            LLUUID regionID = spatialConnection.get()->getRegionID(); + +            if (neighbor_ids.find(regionID) == neighbor_ids.end()) +            { +                // shut down connections to neighbors that are too far away. +                spatialConnection.get()->shutDown(); +            } +            neighbor_ids.erase(regionID);          } -        neighbor_ids.erase(regionID); -    } -    // add new connections for new neighbors -    for (auto &neighbor : neighbor_ids) -    { -        connectionPtr_t  connection(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID)); +        // add new connections for new neighbors +        for (auto &neighbor : neighbor_ids) +        { +            connectionPtr_t connection(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID)); -        mWebRTCConnections.push_back(connection); -        connection->setMicGain(mMicGain); -        connection->setMuteMic(mMuted); -        connection->setSpeakerVolume(mSpeakerVolume); +            mWebRTCConnections.push_back(connection); +            connection->setMicGain(mMicGain); +            connection->setMuteMic(mMuted); +            connection->setSpeakerVolume(mSpeakerVolume); +        }      }      return LLWebRTCVoiceClient::sessionState::processConnectionStates();  } @@ -636,7 +639,7 @@ void LLWebRTCVoiceClient::voiceConnectionCoro()                          }                      }                  } -                else +                if (!voiceEnabled)                  {                      // voice is disabled, so leave and disable PTT                      leaveChannel(true); | 
