From 2de937d0bcb3a0a65627dd6f9c31eee716a56b80 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 23 Feb 2015 09:31:21 +0100 Subject: [PATCH] Add FSUseAis3Api debug setting to turn off AIS3 --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llaisapi.cpp | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7a9401de72..d06e7bd7b2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -23138,6 +23138,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSUseAis3Api + + Comment + Option to disable the use of the new AISv3 inventory API + Persist + 1 + Type + Boolean + Value + 1 + diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 9d887a61f1..c86756a175 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -123,7 +123,10 @@ void AISCommand::httpFailure() //static bool AISCommand::isAPIAvailable() { - if (gAgent.getRegion()) + // Add AIS3 debug setting + //if (gAgent.getRegion()) + if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api")) + // { return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3"); } @@ -133,7 +136,10 @@ bool AISCommand::isAPIAvailable() //static bool AISCommand::getInvCap(std::string& cap) { - if (gAgent.getRegion()) + // Add AIS3 debug setting + //if (gAgent.getRegion()) + if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api")) + // { cap = gAgent.getRegion()->getCapability("InventoryAPIv3"); } @@ -147,7 +153,10 @@ bool AISCommand::getInvCap(std::string& cap) //static bool AISCommand::getLibCap(std::string& cap) { - if (gAgent.getRegion()) + // Add AIS3 debug setting + //if (gAgent.getRegion()) + if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api")) + // { cap = gAgent.getRegion()->getCapability("LibraryAPIv3"); }