summaryrefslogtreecommitdiff
path: root/indra/newview/llmarketplacefunctions.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-11-10 10:30:22 -0800
committerMerov Linden <merov@lindenlab.com>2014-11-10 10:30:22 -0800
commit1461740a6818c752d3780f04431a4b3948616eb5 (patch)
tree12e48b340bda8e3f531ee998dc4d52c6b0384fd0 /indra/newview/llmarketplacefunctions.cpp
parent20173c9747e8205988d4f2f6f8d0b6c3d75e6e3d (diff)
DD-276 : Let the count on hand be updated locally when updateSLMListing returns with data from the server
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index c6660881f0..d900d29925 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -1440,9 +1440,8 @@ bool LLMarketplaceData::activateListing(const LLUUID& folder_id, bool activate)
LLUUID version_uuid = getVersionFolder(listing_uuid);
- // Keep track of the count on hand
+ // Also update the count on hand
S32 count = compute_stock_count(folder_id);
- setCountOnHand(folder_id, count);
// Post the listing update request to SLM
updateSLMListing(listing_uuid, listing_id, version_uuid, activate, count);
@@ -1465,9 +1464,8 @@ bool LLMarketplaceData::setVersionFolder(const LLUUID& folder_id, const LLUUID&
// Note: if the version_id is cleared, we need to unlist the listing, otherwise, state unchanged
bool is_listed = (version_id.isNull() ? false : getActivationState(listing_uuid));
- // Keep track of the count on hand
+ // Also update the count on hand
S32 count = compute_stock_count(version_id);
- setCountOnHand(folder_id, count);
// Post the listing update request to SLM
updateSLMListing(listing_uuid, listing_id, version_id, is_listed, count);
@@ -1491,9 +1489,8 @@ bool LLMarketplaceData::updateCountOnHand(const LLUUID& folder_id)
bool is_listed = getActivationState(listing_uuid);
LLUUID version_uuid = getVersionFolder(listing_uuid);
- // Update the count on hand
+ // Compute the new count on hand
S32 count = compute_stock_count(folder_id);
- setCountOnHand(folder_id, count);
// Post the listing update request to SLM
updateSLMListing(listing_uuid, listing_id, version_uuid, is_listed, count);
@@ -1509,9 +1506,6 @@ bool LLMarketplaceData::associateListing(const LLUUID& folder_id, const LLUUID&
return false;
}
- // Clear the count on hand in that case (we don't have a version folder anymore)
- setCountOnHand(folder_id, -1);
-
// Post the listing update request to SLM
associateSLMListing(folder_id, listing_id, source_folder_id);