summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rwxr-xr-xindra/newview/llvoicevivox.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 9497041482..050d9dd785 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -261,6 +261,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
mSessionTerminateRequested(false),
mRelogRequested(false),
mConnected(false),
+ mTerminateDaemon(false),
mPump(NULL),
mSpatialJoiningNum(0),
@@ -695,7 +696,7 @@ void LLVivoxVoiceClient::stateMachine()
setVoiceEnabled(false);
}
- if(mVoiceEnabled || !mIsInitialized)
+ if(mVoiceEnabled || (!mIsInitialized &&!mTerminateDaemon) )
{
updatePosition();
}
@@ -708,11 +709,12 @@ void LLVivoxVoiceClient::stateMachine()
if((getState() != stateDisabled) && (getState() != stateDisableCleanup))
{
// User turned off voice support. Send the cleanup messages, close the socket, and reset.
- if(!mConnected)
+ if(!mConnected || mTerminateDaemon)
{
// if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill.
LL_INFOS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL;
killGateway();
+ mTerminateDaemon = false;
}
logout();
@@ -753,7 +755,7 @@ void LLVivoxVoiceClient::stateMachine()
// Voice is locked out, we must not launch the vivox daemon.
setState(stateJail);
}
- else if(!isGatewayRunning())
+ else if(!isGatewayRunning() && gSavedSettings.getBOOL("EnableVoiceChat"))
{
if (true) // production build, not test
{
@@ -1136,6 +1138,7 @@ void LLVivoxVoiceClient::stateMachine()
std::stringstream errs;
errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000";
args["HOSTID"] = errs.str();
+ mTerminateDaemon = true;
if (LLGridManager::getInstance()->isSystemGrid())
{
LLNotificationsUtil::add("NoVoiceConnect", args);
@@ -2618,6 +2621,7 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st
std::stringstream errs;
errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000";
args["HOSTID"] = errs.str();
+ mTerminateDaemon = true;
if (LLGridManager::getInstance()->isSystemGrid())
{
LLNotificationsUtil::add("NoVoiceConnect", args);
@@ -2633,6 +2637,7 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st
LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL;
mVoiceVersion.serverVersion = versionID;
mConnectorHandle = connectorHandle;
+ mTerminateDaemon = false;
if(getState() == stateConnectorStarting)
{
setState(stateConnectorStarted);