From 6adce024a533566bd0d48fb1f8ad49260809fb12 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 16 Mar 2016 17:56:14 +0200 Subject: MAINT-5938 FIXED when Marketplace is down viewer errors 499 at each login and teleport --- indra/newview/llmarketplacefunctions.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index dfa33b37ef..6cc7a0fc99 100755 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -795,6 +795,15 @@ void LLMarketplaceData::getMerchantStatusCoro() log_SLM_infos("Get /merchant", httpCode, std::string("Merchant is not migrated")); setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_MIGRATED_MERCHANT); } + else if (httpCode == HTTP_INTERNAL_ERROR) + { + // 499 includes timeout and ssl error - marketplace is down or having issues, we do not show it in this request according to MAINT-5938 + LL_WARNS("SLM") << "SLM Merchant Request failed with status: " << httpCode + << ", reason : " << status.toString() + << ", code : " << result["error_code"].asString() + << ", description : " << result["error_description"].asString() << LL_ENDL; + LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_CONNECTION_FAILURE); + } else { std::string err_code = result["error_code"].asString(); -- cgit v1.2.3 From a9f001f276b9f828cb02a19b7c6256b198a0b387 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 5 Apr 2016 16:58:12 +0300 Subject: Backed out changeset: a481e543cc74 --- indra/newview/llpanelpermissions.cpp | 44 +++++++++++++++++------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 0088163fee..263c73dc0e 100755 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -1080,30 +1080,28 @@ void LLPanelPermissions::setAllSaleInfo() LLSaleInfo new_sale_info(sale_type, price); LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info); + + U8 old_click_action = 0; + LLSelectMgr::getInstance()->selectionGetClickAction(&old_click_action); - bool selection_set_for_sale = new_sale_info.isForSale(); - bool selection_was_for_sale = old_sale_info.isForSale(); - if (selection_was_for_sale != selection_set_for_sale) - { - // sale state changed, switch click-actions - // but don't touch user changed actions - U8 old_action = selection_set_for_sale ? CLICK_ACTION_TOUCH : CLICK_ACTION_BUY; - U8 new_action = selection_set_for_sale ? CLICK_ACTION_BUY : CLICK_ACTION_TOUCH; - struct f : public LLSelectedObjectFunctor - { - U8 mActionOld, mActionNew; - f(const U8& t_old, const U8& t_new) : mActionOld(t_old), mActionNew(t_new) {} - virtual bool apply(LLViewerObject* object) - { - if (object->getClickAction() == mActionOld) - { - object->setClickAction(mActionNew); - } - return true; - } - } func(old_action, new_action); - LLSelectMgr::getInstance()->getSelection()->applyToObjects(&func); - } + if (old_sale_info.isForSale() + && !new_sale_info.isForSale() + && old_click_action == CLICK_ACTION_BUY) + { + // If turned off for-sale, make sure click-action buy is turned + // off as well + LLSelectMgr::getInstance()-> + selectionSetClickAction(CLICK_ACTION_TOUCH); + } + else if (new_sale_info.isForSale() + && !old_sale_info.isForSale() + && old_click_action == CLICK_ACTION_TOUCH) + { + // If just turning on for-sale, preemptively turn on one-click buy + // unless user have a different click action set + LLSelectMgr::getInstance()-> + selectionSetClickAction(CLICK_ACTION_BUY); + } } struct LLSelectionPayable : public LLSelectedObjectFunctor -- cgit v1.2.3