summaryrefslogtreecommitdiff
path: root/indra/newview/llaccountingcostmanager.cpp
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2011-08-22 23:41:54 +0300
committerSeth ProductEngine <slitovchuk@productengine.com>2011-08-22 23:41:54 +0300
commit056015963290e47e03972e17ce6d603f8f940fe3 (patch)
tree7a8329b2cb6525d809f7fe8ce921b7aeb99f16f8 /indra/newview/llaccountingcostmanager.cpp
parentca8a484f0ee4bcb9b68268f871082d4200062f0e (diff)
SH-2171 ADDITIONAL FIX Added transaction ID to object weights requests to avoid updating the floater upon outdated or mixed up replies arrival.
Diffstat (limited to 'indra/newview/llaccountingcostmanager.cpp')
-rw-r--r--indra/newview/llaccountingcostmanager.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp
index 0669bdfffa..3717344aef 100644
--- a/indra/newview/llaccountingcostmanager.cpp
+++ b/indra/newview/llaccountingcostmanager.cpp
@@ -41,8 +41,13 @@ public:
: mObjectIDs( objectIDs ),
mObserverHandle( observer_handle )
{
+ LLAccountingCostObserver* observer = mObserverHandle.get();
+ if (observer)
+ {
+ mTransactionID = observer->getTransactionID();
+ }
}
-
+
void clearPendingRequests ( void )
{
for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter )
@@ -57,7 +62,7 @@ public:
clearPendingRequests();
LLAccountingCostObserver* observer = mObserverHandle.get();
- if (observer)
+ if (observer && observer->getTransactionID() == mTransactionID)
{
observer->setErrorStatus(statusNum, reason);
}
@@ -86,7 +91,7 @@ public:
SelectionCost selectionCost( /*transactionID,*/ physicsCost, networkCost, simulationCost );
LLAccountingCostObserver* observer = mObserverHandle.get();
- if (observer)
+ if (observer && observer->getTransactionID() == mTransactionID)
{
observer->onWeightsUpdate(selectionCost);
}
@@ -99,6 +104,9 @@ private:
//List of posted objects
LLSD mObjectIDs;
+ // Current request ID
+ LLUUID mTransactionID;
+
// Cost update observer handle
LLHandle<LLAccountingCostObserver> mObserverHandle;
};