diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-06-28 11:02:11 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-06-28 11:02:11 -0400 |
commit | 726851b039b0b0e7d623970f32b6b28616a07dc8 (patch) | |
tree | 01dd9d23638486031dcc49d201c35d8338091794 /indra/llmessage | |
parent | e9d2f57866e7e4dcb46b21bef525eb9955691578 (diff) | |
parent | 6f8b812ecd73bf25d44445e1b791f9e1b01f429f (diff) |
DRTVWR-582: Merge branch DRTVWR-582-maint-U into contribute-frozen
to resolve conflicts in installer_template.nsi
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llcircuit.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 42 | ||||
-rw-r--r-- | indra/llmessage/llcorehttputil.h | 4 | ||||
-rwxr-xr-x | indra/llmessage/tests/test_llsdmessage_peer.py | 4 |
5 files changed, 52 insertions, 6 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 846549b368..87fd5a154f 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -253,7 +253,9 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h { const LLUUID& agent_id = *it; - LL_WARNS("AvNameCache") << "LLAvatarNameResponder::result " + // If cap fails, response can contain a lot of names, + // don't spam too much + LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result " << "failed id " << agent_id << LL_ENDL; @@ -272,7 +274,7 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) if (existing == mCache.end()) { // there is no existing cache entry, so make a temporary name from legacy - LL_WARNS("AvNameCache") << "LLAvatarNameCache get legacy for agent " + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache get legacy for agent " << agent_id << LL_ENDL; gCacheName->get(agent_id, false, // legacy compatibility boost::bind(&LLAvatarNameCache::legacyNameFetch, _1, _2, _3)); diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 8baa2e328b..a9a292958f 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -271,7 +271,6 @@ void LLCircuitData::ackReliablePacket(TPACKETID packet_num) S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) { - S32 resent_packets = 0; LLReliablePacket *packetp; @@ -375,7 +374,6 @@ S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) // Don't remove it yet, it still gets to try to resend at least once. ++iter; } - resent_packets++; } else { diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index c8c9280029..6b9ce54c92 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -1336,6 +1336,48 @@ void HttpCoroutineAdapter::trivialPostCoro(std::string url, LLCore::HttpRequest: } +/*static*/ +void HttpCoroutineAdapter::callbackHttpDel(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, + completionCallback_t failure) +{ + LLCoros::instance().launch("HttpCoroutineAdapter::genericDelCoro", + boost::bind(&HttpCoroutineAdapter::trivialDelCoro, url, policyId, success, failure)); +} + +/*static*/ +void HttpCoroutineAdapter::trivialDelCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, + completionCallback_t failure) +{ + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericDelCoro", policyId)); + LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + + httpOpts->setWantHeaders(true); + + LL_INFOS("HttpCoroutineAdapter", "genericDelCoro") << "Generic DEL for " << url << LL_ENDL; + + LLSD result = httpAdapter->deleteAndSuspend(httpRequest, url, httpOpts); + + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + + if (!status) + { + if (failure) + { + failure(httpResults); + } + } + else + { + if (success) + { + success(result); + } + } +} + + } // end namespace LLCoreHttpUtil diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h index 6f0b865f83..8df1425f2a 100644 --- a/indra/llmessage/llcorehttputil.h +++ b/indra/llmessage/llcorehttputil.h @@ -608,6 +608,9 @@ public: callbackHttpPost(url, LLCore::HttpRequest::DEFAULT_POLICY_ID, postData, success, failure); } + static void callbackHttpDel(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success = NULL, + completionCallback_t failure = NULL); + /// Generic Get and post routines for HTTP via coroutines. /// These static methods do all required setup for the GET or POST operation. /// When the operation completes successfully they will put the success message in the log at INFO level, @@ -669,6 +672,7 @@ private: static void trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure); static void trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure); + static void trivialDelCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure); void checkDefaultHeaders(LLCore::HttpHeaders::ptr_t &headers); diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index 5ba0749e31..8e9b6c09e7 100755 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -33,8 +33,8 @@ import os import sys from http.server import HTTPServer, BaseHTTPRequestHandler -from llbase.fastest_elementtree import parse as xml_parse -from llbase import llsd +from llsd.fastest_elementtree import parse as xml_parse +import llsd from testrunner import freeport, run, debug, VERBOSE import time |