summaryrefslogtreecommitdiff
path: root/indra/newview/llremoteparcelrequest.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-19 00:03:19 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-19 00:03:42 +0200
commit969ed536806dce1fe2fa8fc9b312f1c80e671d84 (patch)
tree3e8c7e74cbecf7aefe250b03a72651dd781bf8ed /indra/newview/llremoteparcelrequest.cpp
parentf462037b8e3474115a1f039ce0cd56c98e320227 (diff)
parentc99e3167ed8549bc13d7df03b1e12dc15b0a080f (diff)
Merge branch 'release/2025.03' into release/2025.04
Diffstat (limited to 'indra/newview/llremoteparcelrequest.cpp')
-rw-r--r--indra/newview/llremoteparcelrequest.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp
index 7b80e8c27f..d0aa1af2f3 100644
--- a/indra/newview/llremoteparcelrequest.cpp
+++ b/indra/newview/llremoteparcelrequest.cpp
@@ -102,7 +102,15 @@ void LLRemoteParcelInfoProcessor::processParcelInfoReply(LLMessageSystem* msg, v
msg->getS32 ("Data", "SalePrice", parcel_data.sale_price);
msg->getS32 ("Data", "AuctionID", parcel_data.auction_id);
- LLRemoteParcelInfoProcessor::observer_multimap_t & observers = LLRemoteParcelInfoProcessor::getInstance()->mObservers;
+ LLRemoteParcelInfoProcessor* inst = LLRemoteParcelInfoProcessor::getInstance();
+
+ requests_map_t::const_iterator found = inst->mPendingParcelRequests.find(parcel_data.parcel_id);
+ if (found != inst->mPendingParcelRequests.end())
+ {
+ inst->mPendingParcelRequests.erase(found);
+ }
+
+ LLRemoteParcelInfoProcessor::observer_multimap_t & observers = inst->mObservers;
typedef std::vector<observer_multimap_t::iterator> deadlist_t;
deadlist_t dead_iters;
@@ -151,6 +159,15 @@ void LLRemoteParcelInfoProcessor::processParcelInfoReply(LLMessageSystem* msg, v
void LLRemoteParcelInfoProcessor::sendParcelInfoRequest(const LLUUID& parcel_id)
{
+ constexpr F32 DUPPLICATE_TIMEOUT = 0.5f;
+ requests_map_t::const_iterator found = mPendingParcelRequests.find(parcel_id);
+ if (found != mPendingParcelRequests.end() && found->second.getElapsedTimeF32() < DUPPLICATE_TIMEOUT)
+ {
+ // recently requested
+ return;
+ }
+ mPendingParcelRequests[parcel_id].reset();
+
LLMessageSystem *msg = gMessageSystem;
msg->newMessage("ParcelInfoRequest");