diff options
Diffstat (limited to 'indra/newview/llaccountingcostmanager.cpp')
-rw-r--r-- | indra/newview/llaccountingcostmanager.cpp | 14 |
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; }; |