Remove the actual filter part of Appearance-AISFilter since deprecated UDP simulator messages are going to be removed from the backend in near future
parent
c2269ce6ef
commit
dc000055a2
|
|
@ -1582,17 +1582,6 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AISCommandFilterMask</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>AIS command filter (death by Kitty if you change this)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>65247</integer>
|
||||
</map>
|
||||
<key>AlertedUnsupportedHardware</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
// <FS:Ansariel> Add AIS3 debug setting
|
||||
//if (gAgent.getRegion())
|
||||
if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api"))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
|
||||
static LLCachedControl<U32> 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;
|
||||
|
|
|
|||
|
|
@ -41,23 +41,7 @@ class AISAPI
|
|||
public:
|
||||
typedef boost::function<void(const LLUUID &invItem)> 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());
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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<LLInventoryCallback> 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<LLViewerInventoryCategory> 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<LLInventoryCallback> 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<LLInventoryCallback> 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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue