diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-03-12 17:24:07 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-03-12 17:24:07 -0400 |
commit | d9e3a2948af710741c99014bef03e8d97f69804c (patch) | |
tree | 98ed67f97cb6522f80c3720b4d1ae623e4c5920f /indra/newview/llvoicevivox.cpp | |
parent | 895d52a399739962c38ddf571e57f85362823dff (diff) | |
parent | cb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff) |
merge
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rwxr-xr-x | indra/newview/llvoicevivox.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index c0168d38ba..9d1c84875e 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -268,6 +268,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mSessionTerminateRequested(false), mRelogRequested(false), mConnected(false), + mTerminateDaemon(false), mPump(NULL), mSpatialJoiningNum(0), @@ -702,7 +703,7 @@ void LLVivoxVoiceClient::stateMachine() setVoiceEnabled(false); } - if(mVoiceEnabled || !mIsInitialized) + if(mVoiceEnabled || (!mIsInitialized &&!mTerminateDaemon) ) { updatePosition(); } @@ -715,11 +716,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(); @@ -760,7 +762,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 { @@ -1143,6 +1145,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); @@ -2625,6 +2628,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); @@ -2640,6 +2644,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); |