From b6841d75c2f259c84d5ab6b012bd2ae37d985451 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 15 Apr 2022 19:02:07 -0500 Subject: SL-17219 WIP - Texture pipeline overhaul --- indra/newview/llxmlrpctransaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llxmlrpctransaction.cpp') diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 32c8ce66a0..2b400c5586 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -395,7 +395,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler( mHttpRequest, this )); - mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID, 0, + mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID, mURI, body.get(), httpOpts, httpHeaders, mHandler); } -- cgit v1.2.3 From fc424a0db90fd2d2e44e85a19750ad6eaa57b28a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 9 Dec 2022 13:21:45 -0500 Subject: SL-18809: Add WorkSchedule; remove timestamps from WorkQueue. For work queues that don't need timestamped tasks, eliminate the overhead of a priority queue ordered by timestamp. Timestamped task support moves to WorkSchedule. WorkQueue is a simpler queue that just waits for work. Both WorkQueue and WorkSchedule can be accessed via new WorkQueueBase API. Of course the WorkQueueBase API doesn't deal with timestamps, but a WorkSchedule can be accessed directly to post timestamped tasks and then handled normally (e.g. by ThreadPool) to run them. Most ThreadPool functionality migrates to new ThreadPoolBase class, with template subclass ThreadPoolUsing or ThreadPoolUsing depending on need. ThreadPool is now an alias for ThreadPoolUsing. Importantly, ThreadPoolUsing::getQueue() delivers a reference to the specific queue subclass type, so you can post timestamped tasks on a queue retrieved from ThreadPoolUsing::getQueue(). Since ThreadPool is no longer a simple class but an alias for a particular template specialization, introduce threadpool_fwd.h to forward-declare it. Recast workqueue_test.cpp to exercise WorkSchedule, since some of the tests are time-based. A future todo would be to exercise each applicable test with both WorkQueue and WorkSchedule. --- indra/newview/llxmlrpctransaction.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llxmlrpctransaction.cpp') diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 80e94c37f2..20084aa5d1 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -45,6 +45,12 @@ // Have to include these last to avoid queue redefinition! #include +// contains a harmful #define queue xmlrpc_queue. This +// breaks any use of std::queue. Ditch that #define: if any of our code wants +// to reference xmlrpc_queue, let it reference it directly. +#if defined(queue) +#undef queue +#endif #include "llappviewer.h" #include "lltrans.h" -- cgit v1.2.3 From 3c63cc9c55b1193f2876e7523f0b6766f5a8c5ac Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jun 2023 18:36:51 -0400 Subject: SL-18837: Make LLVersionInfo::getBuild() S64 for GitHub run IDs. --- indra/newview/llxmlrpctransaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llxmlrpctransaction.cpp') diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 8d178dbbdc..b851b7ad5c 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -384,7 +384,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); - std::string user_agent = llformat("%s %d.%d.%d (%d)", + std::string user_agent = llformat("%s %d.%d.%d (%ld)", LLVersionInfo::instance().getChannel().c_str(), LLVersionInfo::instance().getMajor(), LLVersionInfo::instance().getMinor(), -- cgit v1.2.3 From 117f07e5a4b7882a44681c730dcc0628238cfec6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 17 Oct 2023 06:33:05 -0400 Subject: SL-18837: Avoid stuffing build number into 32-bit int. Even though LLVersionInfo::getBuild() already returns a 64-bit int, various consumers assumed it could fit into 32 bits. It was especially bad to pass it to a classic C style varargs function. Only on a little-endian CPU, and only because it was the last argument, the damage was limited to truncation -- instead of arbitrary undefined behavior. Where the consumer doesn't support 64-bit ints, pass as string instead. --- indra/newview/llxmlrpctransaction.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'indra/newview/llxmlrpctransaction.cpp') diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index b851b7ad5c..8ea07fcee0 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -42,6 +42,7 @@ #include "bufferarray.h" #include "llversioninfo.h" #include "llviewercontrol.h" +#include "stringize.h" // Have to include these last to avoid queue redefinition! @@ -384,14 +385,14 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); - std::string user_agent = llformat("%s %d.%d.%d (%ld)", - LLVersionInfo::instance().getChannel().c_str(), - LLVersionInfo::instance().getMajor(), - LLVersionInfo::instance().getMinor(), - LLVersionInfo::instance().getPatch(), - LLVersionInfo::instance().getBuild()); + std::string user_agent = stringize( + LLVersionInfo::instance().getChannel(), ' ', + LLVersionInfo::instance().getMajor(), '.', + LLVersionInfo::instance().getMinor(), '.', + LLVersionInfo::instance().getPatch(), " (", + LLVersionInfo::instance().getBuild(), ')'); - httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); + httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); ///* Setting the DNS cache timeout to -1 disables it completely. //This might help with bug #503 */ -- cgit v1.2.3