DD-381 : Fix update of count on hand on drop. Will spam SLM a bit but only solution

meow-7.2.2
Merov Linden 2015-04-07 22:49:40 -07:00
parent 19b0fd1fd0
commit c5c027eb14
1 changed files with 3 additions and 4 deletions

View File

@ -289,8 +289,7 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool perform_consistenc
}
// Check if the count on hand needs to be updated on SLM
if (perform_consistency_enforcement && !LLMarketplaceData::instance().isUpdating(listing_uuid) &&
(compute_stock_count(listing_uuid) != LLMarketplaceData::instance().getCountOnHand(listing_uuid)))
if (perform_consistency_enforcement && (compute_stock_count(listing_uuid) != LLMarketplaceData::instance().getCountOnHand(listing_uuid)))
{
LLMarketplaceData::instance().updateCountOnHand(listing_uuid);
}
@ -1053,7 +1052,7 @@ S32 compute_stock_count(LLUUID cat_uuid, bool force_count /* false */)
if (version_folder_uuid.notNull())
{
// If there is a version folder, the stock value for the listing is the version folder stock
return compute_stock_count(version_folder_uuid);
return compute_stock_count(version_folder_uuid, true);
}
else
{
@ -1084,7 +1083,7 @@ S32 compute_stock_count(LLUUID cat_uuid, bool force_count /* false */)
for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++)
{
LLInventoryCategory* category = *iter;
S32 count = compute_stock_count(category->getUUID());
S32 count = compute_stock_count(category->getUUID(), true);
if ((curr_count == -1) || ((count != -1) && (count < curr_count)))
{
curr_count = count;