From dc000055a268ae3eacd7db0384cf760ebfb8a29d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 18 May 2016 16:13:05 +0200 Subject: [PATCH] Remove the actual filter part of Appearance-AISFilter since deprecated UDP simulator messages are going to be removed from the backend in near future --- indra/newview/app_settings/settings.xml | 11 ------- indra/newview/llaisapi.cpp | 13 +------- indra/newview/llaisapi.h | 18 +---------- indra/newview/llhttpretrypolicy.cpp | 9 ------ indra/newview/llhttpretrypolicy.h | 6 ---- indra/newview/llviewerinventory.cpp | 40 +++++-------------------- 6 files changed, 10 insertions(+), 87 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e155bb618d..cbfacc4308 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1582,17 +1582,6 @@ Value 0 - AISCommandFilterMask - - Comment - AIS command filter (death by Kitty if you change this) - Persist - 1 - Type - U32 - Value - 65247 - AlertedUnsupportedHardware Comment diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 7d0409d0f0..7799155e3b 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -46,24 +46,13 @@ const std::string AISAPI::LIBRARY_CAP_NAME("LibraryAPIv3"); //------------------------------------------------------------------------- /*static*/ -//bool AISAPI::isAvailable() -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) -bool AISAPI::isAvailable(EAISCommand cmd) -// [/SL:KB] +bool AISAPI::isAvailable() { // Add AIS3 debug setting //if (gAgent.getRegion()) if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api")) // { -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - static LLCachedControl COMMAND_FILTER_MASK(gSavedSettings, "AISCommandFilterMask", U32_MAX); - - bool aisAvailable = gAgent.getRegion()->isCapabilityAvailable(INVENTORY_CAP_NAME); - return - (aisAvailable) && - ( (CMD_UNKNOWN == cmd) || ((U32)cmd & COMMAND_FILTER_MASK) ); -// [/SL:KB] //return gAgent.getRegion()->isCapabilityAvailable(INVENTORY_CAP_NAME); } return false; diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index df128efe60..9330dedda5 100755 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -41,23 +41,7 @@ class AISAPI public: typedef boost::function completion_t; -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - // The debug setting is an OR of these values - enum EAISCommand - { - CMD_UNKNOWN = 0x0000, // New or command we're not filtering for - CMD_CAT_UPDATE = 0x0001, // update_inventory_category - CMD_CAT_REMOVE = 0x0002, // remove_inventory_category - CMD_CAT_SLAM = 0x0004, // slam_inventory_folder - CMD_CAT_PURGE = 0x0008, // purge_descendents_of - CMD_ITEM_REMOVE = 0x0010, // remove_inventory_item - CMD_ITEM_UPDATE = 0x0020, // update_inventory_item - CMD_OBJ_LINK = 0x0100, // link_inventory_array - CMD_OBJ_LINKBATCH = 0x0200, // link_inventory_array - }; - static bool isAvailable(EAISCommand cmd = CMD_UNKNOWN); -// [/SL:KB] - //static bool isAvailable(); + static bool isAvailable(); static void getCapNames(LLSD& capNames); static void CreateInventory(const LLUUID& parentId, const LLSD& newInventory, completion_t callback = completion_t()); diff --git a/indra/newview/llhttpretrypolicy.cpp b/indra/newview/llhttpretrypolicy.cpp index 30e5519ac5..6a2daeeb90 100755 --- a/indra/newview/llhttpretrypolicy.cpp +++ b/indra/newview/llhttpretrypolicy.cpp @@ -64,15 +64,6 @@ void LLAdaptiveRetryPolicy::reset() init(); } -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-06-27 (Catznip-3.7) -// virtual -void LLAdaptiveRetryPolicy::cancelRetry() -{ - // This relies on the current implementation where mShouldRetry is set to true only on initialization - mShouldRetry = false; -} -// [/SL:KB] - bool LLAdaptiveRetryPolicy::getRetryAfter(const LLSD& headers, F32& retry_header_time) { return (headers.has(HTTP_IN_HEADER_RETRY_AFTER) diff --git a/indra/newview/llhttpretrypolicy.h b/indra/newview/llhttpretrypolicy.h index d71e114c5d..af07b4afec 100755 --- a/indra/newview/llhttpretrypolicy.h +++ b/indra/newview/llhttpretrypolicy.h @@ -55,9 +55,6 @@ public: virtual bool shouldRetry(F32& seconds_to_wait) const = 0; virtual void reset() = 0; -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-06-27 (Catznip-3.7) - virtual void cancelRetry() = 0; -// [/SL:KB] }; // Very general policy with geometric back-off after failures, @@ -71,9 +68,6 @@ public: void onSuccess(); void reset(); -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-06-27 (Catznip-3.7) - /*virtual*/ void cancelRetry(); -// [/SL:KB] // virtual void onFailure(S32 status, const LLSD& headers); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 82b4376960..4839a369dd 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1307,10 +1307,7 @@ void link_inventory_array(const LLUUID& category, #endif } -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable( (baseobj_array.size() > 1) ? AISAPI::CMD_OBJ_LINKBATCH : AISAPI::CMD_OBJ_LINK )) -// [/SL:KB] + if (AISAPI::isAvailable()) { LLSD new_inventory = LLSD::emptyMap(); new_inventory["links"] = links; @@ -1374,10 +1371,7 @@ void update_inventory_item( LLPointer cb) { const LLUUID& item_id = update_item->getUUID(); -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable(AISAPI::CMD_ITEM_UPDATE)) -// [/SL:KB] + if (AISAPI::isAvailable()) { LLSD updates = update_item->asLLSD(); // Replace asset_id and/or shadow_id with transaction_id (hash_id) @@ -1446,10 +1440,7 @@ void update_inventory_item( } // [/SL:KB] -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable(AISAPI::CMD_ITEM_UPDATE)) -// [/SL:KB] + if (AISAPI::isAvailable()) { AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::UpdateItem(item_id, updates, cr); @@ -1508,10 +1499,7 @@ void update_inventory_category( LLPointer new_cat = new LLViewerInventoryCategory(obj); new_cat->fromLLSD(updates); // FIXME - restore this once the back-end work has been done. -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable(AISAPI::CMD_CAT_UPDATE)) -// [/SL:KB] + if (AISAPI::isAvailable()) { LLSD new_llsd = new_cat->asLLSD(); AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); @@ -1577,10 +1565,7 @@ void remove_inventory_item( { const LLUUID item_id(obj->getUUID()); LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << obj->getName() << LL_ENDL; -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable(AISAPI::CMD_ITEM_REMOVE)) -// [/SL:KB] + if (AISAPI::isAvailable()) { AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::RemoveItem(item_id, cr); @@ -1656,10 +1641,7 @@ void remove_inventory_category( LLNotificationsUtil::add("CannotRemoveProtectedCategories"); return; } -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable(AISAPI::CMD_CAT_REMOVE)) -// [/SL:KB] + if (AISAPI::isAvailable()) { AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::RemoveCategory(cat_id, cr); @@ -1762,10 +1744,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) } else { -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable(AISAPI::CMD_CAT_PURGE)) -// [/SL:KB] + if (AISAPI::isAvailable()) { AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::PurgeDescendents(id, cr); @@ -1975,10 +1954,7 @@ void slam_inventory_folder(const LLUUID& folder_id, const LLSD& contents, LLPointer cb) { -// if (AISAPI::isAvailable()) -// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) - if (AISAPI::isAvailable(AISAPI::CMD_CAT_SLAM)) -// [/SL:KB] + if (AISAPI::isAvailable()) { LL_DEBUGS(LOG_INV) << "using AISv3 to slam folder, id " << folder_id << " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL;