Commit e6c0e1ce authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Fix a few globals being repeatedly created in every translation unit

parent 94021060
......@@ -52,6 +52,8 @@
#include "llmetrics.h"
#include "lltrace.h"
const F64Minutes LL_ASSET_STORAGE_TIMEOUT(5);
LLAssetStorage *gAssetStorage = nullptr;
LLMetrics *LLAssetStorage::metric_recipient = nullptr;
......
......@@ -45,8 +45,7 @@ class LLSD;
// anything that takes longer than this to download will abort.
// HTTP Uploads also timeout if they take longer than this.
const F64Minutes LL_ASSET_STORAGE_TIMEOUT(5);
extern const F64Minutes LL_ASSET_STORAGE_TIMEOUT;
// Specific error codes
const int LL_ERR_ASSET_REQUEST_FAILED = -1;
......
......@@ -60,6 +60,11 @@
const S32 PING_START_BLOCK = 3; // How many pings behind we have to be to consider ourself blocked.
const S32 PING_RELEASE_BLOCK = 2; // How many pings behind we have to be to consider ourself unblocked.
const F32Milliseconds LL_AVERAGED_PING_MAX(2000);
const F32Milliseconds LL_AVERAGED_PING_MIN(100); // increased to avoid retransmits when a process is slow
const U32Milliseconds INITIAL_PING_VALUE_MSEC(1000); // initial value for the ping delay, or for ping delay for an unknown circuit
const F32Seconds TARGET_PERIOD_LENGTH(5.f);
const F32Seconds LL_DUPLICATE_SUPPRESSION_TIMEOUT(60.f); //this can be long, as time-based cleanup is
// only done when wrapping packetids, now...
......
......@@ -41,10 +41,10 @@
// Constants
//
const F32 LL_AVERAGED_PING_ALPHA = 0.2f; // relaxation constant on ping running average
const F32Milliseconds LL_AVERAGED_PING_MAX(2000);
const F32Milliseconds LL_AVERAGED_PING_MIN(100); // increased to avoid retransmits when a process is slow
extern const F32Milliseconds LL_AVERAGED_PING_MAX;
extern const F32Milliseconds LL_AVERAGED_PING_MIN; // increased to avoid retransmits when a process is slow
const U32Milliseconds INITIAL_PING_VALUE_MSEC(1000); // initial value for the ping delay, or for ping delay for an unknown circuit
extern const U32Milliseconds INITIAL_PING_VALUE_MSEC; // initial value for the ping delay, or for ping delay for an unknown circuit
const TPACKETID LL_MAX_OUT_PACKET_ID = 0x01000000;
const int LL_ERR_CIRCUIT_GONE = -23017;
......
......@@ -77,6 +77,11 @@
#include "llpounceable.h"
// Constants
const F32Seconds LL_MINIMUM_RELIABLE_TIMEOUT_SECONDS(1.f);
const F32Seconds LL_MINIMUM_SEMIRELIABLE_TIMEOUT_SECONDS(1.f);
const F32Seconds LL_PING_BASED_TIMEOUT_DUMMY(0.0f);
const F32Seconds LL_MAX_LOST_TIMEOUT(5.f); // Maximum amount of time before considering something "lost"
//const char* MESSAGE_LOG_FILENAME = "message.log";
static const F32Seconds CIRCUIT_DUMP_TIMEOUT(30.f);
static const S32 TRUST_TIME_WINDOW = 3;
......
......@@ -140,14 +140,14 @@ enum EPacketHeaderLayout
const S32 LL_DEFAULT_RELIABLE_RETRIES = 3;
const F32Seconds LL_MINIMUM_RELIABLE_TIMEOUT_SECONDS(1.f);
const F32Seconds LL_MINIMUM_SEMIRELIABLE_TIMEOUT_SECONDS(1.f);
const F32Seconds LL_PING_BASED_TIMEOUT_DUMMY(0.0f);
extern const F32Seconds LL_MINIMUM_RELIABLE_TIMEOUT_SECONDS;
extern const F32Seconds LL_MINIMUM_SEMIRELIABLE_TIMEOUT_SECONDS;
extern const F32Seconds LL_PING_BASED_TIMEOUT_DUMMY;
const F32 LL_SEMIRELIABLE_TIMEOUT_FACTOR = 5.f; // averaged ping
const F32 LL_RELIABLE_TIMEOUT_FACTOR = 5.f; // averaged ping
const F32 LL_LOST_TIMEOUT_FACTOR = 16.f; // averaged ping for marking packets "Lost"
const F32Seconds LL_MAX_LOST_TIMEOUT(5.f); // Maximum amount of time before considering something "lost"
extern const F32Seconds LL_MAX_LOST_TIMEOUT; // Maximum amount of time before considering something "lost"
const S32 MAX_MESSAGE_COUNT_NUM = 1024;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment