summaryrefslogtreecommitdiff
path: root/indra/newview/llmarketplacefunctions.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-06-10 22:08:36 -0700
committerMerov Linden <merov@lindenlab.com>2015-06-10 22:08:36 -0700
commit91c6f7a352b01cceac4bbd8cda5d2bed7435f388 (patch)
tree8ae54d4116aef1d259adde76744bc0fad054f8ea /indra/newview/llmarketplacefunctions.cpp
parentab73b1af8fad5f012f782632a08740b4a0a1c8fa (diff)
DD-393 : Rework association so that is_listed property is not overwritten before we get data from SLM
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 4a78d39be9..d5bfe1df4a 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -569,6 +569,9 @@ public:
LLMarketplaceData::instance().addListing(folder_id,listing_id,version_id,is_listed,edit_url,count);
update_marketplace_category(folder_id, false);
gInventory.notifyObservers();
+
+ // The stock count needs to be updated with the new local count now
+ LLMarketplaceData::instance().updateCountOnHand(folder_id,1);
it++;
}
@@ -1661,26 +1664,7 @@ bool LLMarketplaceData::associateListing(const LLUUID& folder_id, const LLUUID&
// Post the listing associate request to SLM
associateSLMListing(folder_id, listing_id, version_id, source_folder_id);
-
- // Update the other values as required
- bool is_listed = false;
- S32 count = -1;
- if (version_id.notNull())
- {
- count = compute_stock_count(version_id, true); // Use the stock count of the new listing
- is_listed = getActivationState(source_folder_id); // Use the activation state of the source listing
- }
- // Validate the count on hand
- if (count == COMPUTE_STOCK_NOT_EVALUATED)
- {
- // If the count on hand cannot be evaluated, we will consider it empty (out of stock) at reassign time
- // It will get reevaluated and updated once the items are fetched
- count = 0;
- }
-
- // Post the listing update request to SLM
- updateSLMListing(folder_id, listing_id, version_id, is_listed, count);
-
+
return true;
}