summaryrefslogtreecommitdiff
path: root/indra/llcorehttp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-07-08 20:27:14 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-07-08 20:27:14 +0200
commit9fdca96f8bd2211a99fe88e57b70cbecefa20b6d (patch)
tree6b5d9b4310eb550c83fba23303bbbc77868af1a5 /indra/llcorehttp
parent9ddf64c65183960ffed4fe61c5d85e8bacaea030 (diff)
Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now
Diffstat (limited to 'indra/llcorehttp')
-rw-r--r--indra/llcorehttp/_httpinternal.h52
-rw-r--r--indra/llcorehttp/httpstats.h4
2 files changed, 28 insertions, 28 deletions
diff --git a/indra/llcorehttp/_httpinternal.h b/indra/llcorehttp/_httpinternal.h
index 768ef98330..2a191fa550 100644
--- a/indra/llcorehttp/_httpinternal.h
+++ b/indra/llcorehttp/_httpinternal.h
@@ -106,17 +106,17 @@ namespace LLCore
// Maxium number of policy classes that can be defined.
// *TODO: Currently limited to the default class + 1, extend.
// (TSN: should this be more dynamically sized. Is there a reason to hard limit the number of policies?)
-const int HTTP_POLICY_CLASS_LIMIT = 32;
+constexpr int HTTP_POLICY_CLASS_LIMIT = 32;
// Debug/informational tracing. Used both
// as a global option and in per-request traces.
-const int HTTP_TRACE_OFF = 0;
-const int HTTP_TRACE_LOW = 1;
-const int HTTP_TRACE_CURL_HEADERS = 2;
-const int HTTP_TRACE_CURL_BODIES = 3;
+constexpr int HTTP_TRACE_OFF = 0;
+constexpr int HTTP_TRACE_LOW = 1;
+constexpr int HTTP_TRACE_CURL_HEADERS = 2;
+constexpr int HTTP_TRACE_CURL_BODIES = 3;
-const int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
-const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
+constexpr int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
+constexpr int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
// Request retry limits
//
@@ -127,41 +127,41 @@ const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
// We want to span a few windows to allow transport to slow
// after onset of the throttles and then recover without a final
// failure. Other systems may need other constants.
-const int HTTP_RETRY_COUNT_DEFAULT = 5;
-const int HTTP_RETRY_COUNT_MIN = 0;
-const int HTTP_RETRY_COUNT_MAX = 100;
-const HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1E6L; // 1 sec
-const HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 5E6L; // 5 sec
-const HttpTime HTTP_RETRY_BACKOFF_MAX = 20E6L; // 20 sec
+constexpr int HTTP_RETRY_COUNT_DEFAULT = 5;
+constexpr int HTTP_RETRY_COUNT_MIN = 0;
+constexpr int HTTP_RETRY_COUNT_MAX = 100;
+constexpr HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1000000UL; // 1 sec
+constexpr HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 50000006UL; // 5 sec
+constexpr HttpTime HTTP_RETRY_BACKOFF_MAX = 20000000UL; // 20 sec
-const int HTTP_REDIRECTS_DEFAULT = 10;
+constexpr int HTTP_REDIRECTS_DEFAULT = 10;
// Timeout value used for both connect and protocol exchange.
// Retries and time-on-queue are not included and aren't
// accounted for.
-const long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
-const long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
-const long HTTP_REQUEST_TIMEOUT_MIN = 0L;
-const long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
+constexpr long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
+constexpr long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
+constexpr long HTTP_REQUEST_TIMEOUT_MIN = 0L;
+constexpr long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
// Limits on connection counts
-const int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
-const int HTTP_CONNECTION_LIMIT_MIN = 1;
-const int HTTP_CONNECTION_LIMIT_MAX = 256;
+constexpr int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
+constexpr int HTTP_CONNECTION_LIMIT_MIN = 1;
+constexpr int HTTP_CONNECTION_LIMIT_MAX = 256;
// Pipelining limits
-const long HTTP_PIPELINING_DEFAULT = 0L;
-const long HTTP_PIPELINING_MAX = 20L;
+constexpr long HTTP_PIPELINING_DEFAULT = 0L;
+constexpr long HTTP_PIPELINING_MAX = 20L;
// Miscellaneous defaults
-const bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
-const long HTTP_THROTTLE_RATE_DEFAULT = 0L;
+constexpr bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
+constexpr long HTTP_THROTTLE_RATE_DEFAULT = 0L;
// Tuning parameters
// Time worker thread sleeps after a pass through the
// request, ready and active queues.
-const int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
+constexpr int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
// Block allocation size (a tuning parameter) is found
// in bufferarray.h.
diff --git a/indra/llcorehttp/httpstats.h b/indra/llcorehttp/httpstats.h
index e1387d9df5..f12e59da0c 100644
--- a/indra/llcorehttp/httpstats.h
+++ b/indra/llcorehttp/httpstats.h
@@ -47,12 +47,12 @@ namespace LLCore
void recordDataDown(size_t bytes)
{
- mDataDown.push(bytes);
+ mDataDown.push((F32)bytes);
}
void recordDataUp(size_t bytes)
{
- mDataUp.push(bytes);
+ mDataUp.push((F32)bytes);
}
void recordHTTPRequest() { ++mRequests; }