Add CPU cycles to AIStateMachine in the crashlogger

Also removes unused Debug Setting CurlMaximumNumberOfHandles.
The maximum number of handles is limitted by
CurlMaxTotalConcurrentConnections.
This commit is contained in:
Aleric Inglewood
2013-03-07 13:44:40 +01:00
parent d1d09d7c18
commit 65d750b190
3 changed files with 10 additions and 13 deletions

View File

@@ -49,6 +49,7 @@
#include "llhttpclient.h" #include "llhttpclient.h"
#include "llsdserialize.h" #include "llsdserialize.h"
#include "llcurl.h" #include "llcurl.h"
#include "aistatemachine.h"
LLPumpIO* gServicePump; LLPumpIO* gServicePump;
BOOL gBreak = false; BOOL gBreak = false;
@@ -374,7 +375,7 @@ void LLCrashLogger::updateApplication(const std::string& message)
{ {
gServicePump->pump(); gServicePump->pump();
gServicePump->callback(); gServicePump->callback();
//FIXME: AIStateMachine::mainloop(); needs CPU cycles. Can't call it from here though, because it uses gSavedSettings which is part of newview. AIStateMachine::mainloop();
} }
bool LLCrashLogger::init() bool LLCrashLogger::init()
@@ -382,6 +383,13 @@ bool LLCrashLogger::init()
// Initialize curl // Initialize curl
AICurlInterface::initCurl(); AICurlInterface::initCurl();
AIStateMachine::setMaxCount(100); // StateMachineMaxTime
// Start curl thread.
AICurlInterface::startCurlThread(64, // CurlMaxTotalConcurrentConnections
8, // CurlConcurrentConnectionsPerHost
true); // NoVerifySSLCert
// We assume that all the logs we're looking for reside on the current drive // We assume that all the logs we're looking for reside on the current drive
gDirUtilp->initAppDirs("SecondLife"); gDirUtilp->initAppDirs("SecondLife");

View File

@@ -621,7 +621,7 @@ AIHTTPTimeoutPolicyBase HTTPTimeoutPolicy_default(
AITP_default_maximum_curl_transaction, AITP_default_maximum_curl_transaction,
AITP_default_maximum_total_delay); AITP_default_maximum_total_delay);
//static. Initialized here, but shortly overwritten by Debug Settings. //static. Initialized here, but shortly overwritten by Debug Settings (except for the crash logger, in which case these are the actual values).
AIHTTPTimeoutPolicyBase AIHTTPTimeoutPolicy::sDebugSettingsCurlTimeout( AIHTTPTimeoutPolicyBase AIHTTPTimeoutPolicy::sDebugSettingsCurlTimeout(
AITP_default_DNS_lookup_grace, AITP_default_DNS_lookup_grace,
AITP_default_maximum_connect_time, AITP_default_maximum_connect_time,

View File

@@ -4459,17 +4459,6 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key> <key>Value</key>
<integer>16</integer> <integer>16</integer>
</map> </map>
<key>CurlMaximumNumberOfHandles</key>
<map>
<key>Comment</key>
<string>Maximum number of handles curl can use (requires restart)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>256</integer>
</map>
<key>CurlTimeoutDNSLookup</key> <key>CurlTimeoutDNSLookup</key>
<map> <map>
<key>Comment</key> <key>Comment</key>