summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2022-11-28 14:33:27 -0800
committerBrad Kittenbrink <brad@lindenlab.com>2022-11-28 14:33:27 -0800
commit0b188ac04ecdb1d620a427eacbf5fc089e0accc8 (patch)
tree76f6afe9424d79bab8d30060d49aec3166d96ec8 /indra/newview/llvoicevivox.cpp
parente9cd2b320ea2ecaab88e4904f7c81746ea617fea (diff)
parentc8f08f232a28f4e08b4acf525f0d316a101a0e27 (diff)
Merge remote-tracking branch 'origin/main' into DRTVWR-528
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r--indra/newview/llvoicevivox.cpp56
1 files changed, 50 insertions, 6 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 19036a3f77..ac6369e4e2 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -690,6 +690,10 @@ void LLVivoxVoiceClient::voiceControlCoro()
// surviving longer than LLVivoxVoiceClient
voiceControlStateMachine(state);
}
+ catch (const LLCoros::Stop&)
+ {
+ LL_DEBUGS("LLVivoxVoiceClient") << "Received a shutdown exception" << LL_ENDL;
+ }
catch (const LLContinueError&)
{
LOG_UNHANDLED_EXCEPTION("LLVivoxVoiceClient");
@@ -1606,13 +1610,33 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()
}
else
{
- LL_WARNS("Voice") << "No voice channel credentials" << LL_ENDL;
-
+ LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel();
+ if (channel != NULL)
+ {
+ if (channel->getSessionName().empty() && channel->getSessionID().isNull())
+ {
+ if (LLViewerParcelMgr::getInstance()->allowAgentVoice())
+ {
+ LL_WARNS("Voice") << "No channel credentials for default channel" << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_WARNS("Voice") << "No voice channel credentials" << LL_ENDL;
+ }
+ }
}
}
else
{
- LL_WARNS("Voice") << "No voice credentials" << LL_ENDL;
+ if (LLViewerParcelMgr::getInstance()->allowAgentVoice())
+ {
+ LL_WARNS("Voice") << "No voice credentials" << LL_ENDL;
+ }
+ else
+ {
+ LL_DEBUGS("Voice") << "No voice credentials" << LL_ENDL;
+ }
}
// set the spatial channel. If no voice credentials or uri are
@@ -4572,6 +4596,23 @@ void LLVivoxVoiceClient::sessionNotificationEvent(std::string &sessionHandle, st
}
}
+void LLVivoxVoiceClient::voiceServiceConnectionStateChangedEvent(int statusCode, std::string &statusString, std::string &build_id)
+{
+ // We don't generally need to process this. However, one occurence is when we first connect, and so it is the
+ // earliest opportunity to learn what we're connected to.
+ if (statusCode)
+ {
+ LL_WARNS("Voice") << "VoiceServiceConnectionStateChangedEvent statusCode: " << statusCode <<
+ "statusString: " << statusString << LL_ENDL;
+ return;
+ }
+ if (build_id.empty())
+ {
+ return;
+ }
+ mVoiceVersion.mBuildVersion = build_id;
+}
+
void LLVivoxVoiceClient::auxAudioPropertiesEvent(F32 energy)
{
LL_DEBUGS("VoiceEnergy") << "got energy " << energy << LL_ENDL;
@@ -4758,7 +4799,7 @@ void LLVivoxVoiceClient::sessionState::VerifySessions()
if ((*it).expired())
{
LL_WARNS("Voice") << "Expired session found! removing" << LL_ENDL;
- mSession.erase(it++);
+ it = mSession.erase(it);
}
else
++it;
@@ -6815,7 +6856,7 @@ void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id)
if (list_iter->second == id)
{
LL_DEBUGS("VoiceFont") << "Removing " << id << " from the voice font list." << LL_ENDL;
- mVoiceFontList.erase(list_iter++);
+ list_iter = mVoiceFontList.erase(list_iter);
mVoiceFontListDirty = true;
}
else
@@ -7554,6 +7595,8 @@ void LLVivoxProtocolParser::EndTag(const char *tag)
connectorHandle = string;
else if (!stricmp("VersionID", tag))
versionID = string;
+ else if (!stricmp("Version", tag))
+ mBuildID = string;
else if (!stricmp("AccountHandle", tag))
accountHandle = string;
else if (!stricmp("State", tag))
@@ -7856,7 +7899,8 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
// We don't need to process this, but we also shouldn't warn on it, since that confuses people.
}
else if (!stricmp(eventTypeCstr, "VoiceServiceConnectionStateChangedEvent"))
- { // Yet another ignored event
+ {
+ LLVivoxVoiceClient::getInstance()->voiceServiceConnectionStateChangedEvent(statusCode, statusString, mBuildID);
}
else if (!stricmp(eventTypeCstr, "AudioDeviceHotSwapEvent"))
{