Merge LL
parent
2bf99d7c6a
commit
5328e5ed11
|
|
@ -292,9 +292,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>d670d00aa732b97d105d287b62582762</string>
|
||||
<string>9b8bcc3be6dbe40a04c9c81c313f70dc</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55065/512118/apr_suite-1.4.5.539073-darwin64-539073.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/68333/658209/apr_suite-1.4.5.548882-darwin64-548882.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -328,9 +328,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>83b4a047db5f7ee462753d91e6277cba</string>
|
||||
<string>6bdf460c18ee004b41a46afc80041a92</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55143/512317/apr_suite-1.4.5.539073-windows-539073.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/68334/658225/apr_suite-1.4.5.548882-windows-548882.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -340,16 +340,16 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>b3bbf168b39e25c08cc1febddeb33332</string>
|
||||
<string>83104bfa4dabb77cd70d185e38a95b49</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55139/512304/apr_suite-1.4.5.539073-windows64-539073.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/68332/658215/apr_suite-1.4.5.548882-windows64-548882.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>1.4.5.539073</string>
|
||||
<string>1.4.5.548882</string>
|
||||
</map>
|
||||
<key>boost</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1024,11 +1024,20 @@ CURLcode HttpOpRequest::curlSslCtxCallback(CURL *curl, void *sslctx, void *userd
|
|||
{
|
||||
HttpOpRequest::ptr_t op(HttpOpRequest::fromHandle<HttpOpRequest>(userdata));
|
||||
|
||||
if (op->mCallbackSSLVerify)
|
||||
{
|
||||
SSL_CTX * ctx = (SSL_CTX *)sslctx;
|
||||
// verification for ssl certs
|
||||
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
|
||||
if (op->mCallbackSSLVerify)
|
||||
{
|
||||
SSL_CTX * ctx = (SSL_CTX *)sslctx;
|
||||
if (op->mReqOptions && op->mReqOptions->getSSLVerifyPeer())
|
||||
{
|
||||
// verification for ssl certs
|
||||
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
// disable any default verification for server certs
|
||||
// Ex: setting urls (assume non-SL) for parcel media in LLFloaterURLEntry
|
||||
SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
|
||||
}
|
||||
// set the verification callback.
|
||||
SSL_CTX_set_cert_verify_callback(ctx, sslCertVerifyCallback, userdata);
|
||||
// the calls are void
|
||||
|
|
|
|||
|
|
@ -274,6 +274,8 @@ static void killGateway()
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool LLVivoxVoiceClient::sShuttingDown = false;
|
||||
|
||||
LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
||||
mSessionTerminateRequested(false),
|
||||
mRelogRequested(false),
|
||||
|
|
@ -382,6 +384,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient()
|
|||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
sShuttingDown = true;
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
|
|
@ -416,6 +419,8 @@ void LLVivoxVoiceClient::terminate()
|
|||
killGateway();
|
||||
}
|
||||
|
||||
sShuttingDown = true;
|
||||
|
||||
// <FS:Ansariel> Delete useless Vivox logs on logout
|
||||
if (gSavedSettings.getString("VivoxDebugLevel") == "0")
|
||||
{
|
||||
|
|
@ -712,13 +717,13 @@ void LLVivoxVoiceClient::voiceControlCoro()
|
|||
|
||||
U32 retry = 0;
|
||||
|
||||
while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !LLApp::isExiting())
|
||||
while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !sShuttingDown)
|
||||
{
|
||||
LL_DEBUGS("Voice") << "Suspending voiceControlCoro() momentarily for teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL;
|
||||
llcoro::suspendUntilTimeout(1.0);
|
||||
}
|
||||
|
||||
if (LLApp::isExiting())
|
||||
if (sShuttingDown)
|
||||
{
|
||||
mIsCoroutineActive = false;
|
||||
return;
|
||||
|
|
@ -749,7 +754,7 @@ void LLVivoxVoiceClient::voiceControlCoro()
|
|||
<< "disconnected"
|
||||
<< " RelogRequested=" << mRelogRequested
|
||||
<< LL_ENDL;
|
||||
if (mRelogRequested)
|
||||
if (mRelogRequested && !sShuttingDown)
|
||||
{
|
||||
if (!success)
|
||||
{
|
||||
|
|
@ -764,14 +769,14 @@ void LLVivoxVoiceClient::voiceControlCoro()
|
|||
LL_INFOS("Voice") << "will attempt to reconnect to voice" << LL_ENDL;
|
||||
}
|
||||
|
||||
while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
|
||||
while (isGatewayRunning() || (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !sShuttingDown))
|
||||
{
|
||||
LL_INFOS("Voice") << "waiting for SLVoice to exit" << LL_ENDL;
|
||||
llcoro::suspendUntilTimeout(1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
while (mVoiceEnabled && mRelogRequested);
|
||||
while (mVoiceEnabled && mRelogRequested && !sShuttingDown);
|
||||
mIsCoroutineActive = false;
|
||||
LL_INFOS("Voice") << "exiting" << LL_ENDL;
|
||||
}
|
||||
|
|
@ -816,7 +821,7 @@ bool LLVivoxVoiceClient::endAndDisconnectSession()
|
|||
|
||||
bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data)
|
||||
{
|
||||
if (!LLAppViewer::isExiting() && mVoiceEnabled)
|
||||
if (!sShuttingDown && mVoiceEnabled)
|
||||
{
|
||||
LL_WARNS("Voice") << "SLVoice terminated " << ll_stream_notation_sd(data) << LL_ENDL;
|
||||
terminateAudioSession(false);
|
||||
|
|
@ -1021,7 +1026,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
|
|||
LL_DEBUGS("Voice") << "Connecting to vivox daemon:" << mDaemonHost << LL_ENDL;
|
||||
|
||||
LLVoiceVivoxStats::getInstance()->reset();
|
||||
while (!mConnected)
|
||||
while (!mConnected && !sShuttingDown)
|
||||
{
|
||||
LLVoiceVivoxStats::getInstance()->connectionAttemptStart();
|
||||
LL_DEBUGS("Voice") << "Attempting to connect to vivox daemon: " << mDaemonHost << LL_ENDL;
|
||||
|
|
@ -1040,6 +1045,11 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
if (sShuttingDown && !mConnected)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS);
|
||||
|
||||
while (!mPump)
|
||||
|
|
@ -1076,7 +1086,7 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
|
|||
{
|
||||
LL_INFOS("Voice") << "Provisioning voice account." << LL_ENDL;
|
||||
|
||||
while (!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived())
|
||||
while ((!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived()) && !sShuttingDown)
|
||||
{
|
||||
LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL;
|
||||
// *TODO* Pump a message for wake up.
|
||||
|
|
@ -1120,10 +1130,15 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
|
|||
{
|
||||
provisioned = true;
|
||||
}
|
||||
} while (!provisioned && retryCount <= PROVISION_RETRY_MAX);
|
||||
} while (!provisioned && retryCount <= PROVISION_RETRY_MAX && !sShuttingDown);
|
||||
|
||||
if (sShuttingDown && !provisioned)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLVoiceVivoxStats::getInstance()->provisionAttemptEnd(provisioned);
|
||||
if (! provisioned )
|
||||
if (!provisioned)
|
||||
{
|
||||
LL_WARNS("Voice") << "Could not access voice provision cap after " << retryCount << " attempts." << LL_ENDL;
|
||||
return false;
|
||||
|
|
@ -1164,6 +1179,11 @@ bool LLVivoxVoiceClient::establishVoiceConnection()
|
|||
LL_WARNS("Voice") << "cannot establish connection; enabled "<<mVoiceEnabled<<" initialized "<<mIsInitialized<<LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sShuttingDown)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLSD result;
|
||||
bool connected(false);
|
||||
|
|
@ -1184,7 +1204,7 @@ bool LLVivoxVoiceClient::establishVoiceConnection()
|
|||
connected = LLSD::Boolean(result["connector"]);
|
||||
if (!connected)
|
||||
{
|
||||
if (result.has("retry") && ++retries <= CONNECT_RETRY_MAX)
|
||||
if (result.has("retry") && ++retries <= CONNECT_RETRY_MAX && !sShuttingDown)
|
||||
{
|
||||
F32 timeout = LLSD::Real(result["retry"]);
|
||||
timeout *= retries;
|
||||
|
|
@ -1212,7 +1232,7 @@ bool LLVivoxVoiceClient::establishVoiceConnection()
|
|||
LL_DEBUGS("Voice") << (connected ? "" : "not ") << "connected, "
|
||||
<< (giving_up ? "" : "not ") << "giving up"
|
||||
<< LL_ENDL;
|
||||
} while (!connected && !giving_up);
|
||||
} while (!connected && !giving_up && !sShuttingDown);
|
||||
|
||||
if (giving_up)
|
||||
{
|
||||
|
|
@ -1299,7 +1319,7 @@ bool LLVivoxVoiceClient::loginToVivox()
|
|||
{
|
||||
std::string loginresp = result["login"];
|
||||
|
||||
if ((loginresp == "retry") || (loginresp == "timeout"))
|
||||
if (((loginresp == "retry") || (loginresp == "timeout")) && !sShuttingDown)
|
||||
{
|
||||
LL_WARNS("Voice") << "login failed with status '" << loginresp << "' "
|
||||
<< " count " << loginRetryCount << "/" << LOGIN_RETRY_MAX
|
||||
|
|
@ -1341,9 +1361,14 @@ bool LLVivoxVoiceClient::loginToVivox()
|
|||
{
|
||||
account_login = true;
|
||||
}
|
||||
else if (sShuttingDown)
|
||||
{
|
||||
mIsLoggingIn = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
} while (!response_ok || !account_login);
|
||||
} while ((!response_ok || !account_login) && !sShuttingDown);
|
||||
|
||||
mRelogRequested = false;
|
||||
mIsLoggedIn = true;
|
||||
|
|
@ -1798,12 +1823,12 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
|
|||
// the region chat.
|
||||
mSessionTerminateRequested = false;
|
||||
|
||||
bool status=((mVoiceEnabled || !mIsInitialized) && !mRelogRequested && !LLApp::isExiting());
|
||||
bool status=((mVoiceEnabled || !mIsInitialized) && !mRelogRequested && !sShuttingDown);
|
||||
LL_DEBUGS("Voice") << "exiting"
|
||||
<< " VoiceEnabled " << mVoiceEnabled
|
||||
<< " IsInitialized " << mIsInitialized
|
||||
<< " RelogRequested " << mRelogRequested
|
||||
<< " AppExiting " << LLApp::isExiting()
|
||||
<< " ShuttingDown " << (sShuttingDown ? "TRUE" : "FALSE")
|
||||
<< " returning " << status
|
||||
<< LL_ENDL;
|
||||
return status;
|
||||
|
|
@ -1841,7 +1866,7 @@ bool LLVivoxVoiceClient::waitForChannel()
|
|||
mIsProcessingChannels = true;
|
||||
llcoro::suspend();
|
||||
|
||||
if (LLApp::isExiting())
|
||||
if (sShuttingDown)
|
||||
{
|
||||
mRelogRequested = false;
|
||||
break;
|
||||
|
|
@ -1895,13 +1920,13 @@ bool LLVivoxVoiceClient::waitForChannel()
|
|||
llcoro::suspendUntilTimeout(1.0);
|
||||
}
|
||||
|
||||
if (LLApp::isExiting())
|
||||
if (sShuttingDown)
|
||||
{
|
||||
mRelogRequested = false;
|
||||
break;
|
||||
}
|
||||
|
||||
} while (mVoiceEnabled && !mRelogRequested);
|
||||
} while (mVoiceEnabled && !mRelogRequested && !sShuttingDown);
|
||||
|
||||
LL_DEBUGS("Voice")
|
||||
<< "leaving inner waitForChannel loop"
|
||||
|
|
@ -1923,14 +1948,14 @@ bool LLVivoxVoiceClient::waitForChannel()
|
|||
return false;
|
||||
}
|
||||
}
|
||||
} while (mVoiceEnabled && mRelogRequested && isGatewayRunning());
|
||||
} while (mVoiceEnabled && mRelogRequested && isGatewayRunning() && !sShuttingDown);
|
||||
|
||||
LL_DEBUGS("Voice")
|
||||
<< "exiting"
|
||||
<< " RelogRequested=" << mRelogRequested
|
||||
<< " VoiceEnabled=" << mVoiceEnabled
|
||||
<< LL_ENDL;
|
||||
return !LLApp::isExiting();
|
||||
return !sShuttingDown;
|
||||
}
|
||||
|
||||
bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
|
||||
|
|
|
|||
|
|
@ -925,6 +925,8 @@ private:
|
|||
bool mIsProcessingChannels;
|
||||
bool mIsCoroutineActive;
|
||||
|
||||
static bool sShuttingDown; // corutines can last longer than vivox so we need a static variable as a shutdown flag
|
||||
|
||||
LLEventMailDrop mVivoxPump;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue