summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llvoiceclient.cpp10
-rw-r--r--indra/newview/llvoicewebrtc.cpp47
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);