MAINT-7794 Wrap getCapability(..) calls to avoid crashes
parent
56f53cd9f5
commit
9ee708707e
|
|
@ -116,7 +116,7 @@ void LLEstateInfoModel::notifyCommit()
|
|||
// tries to send estate info using a cap; returns true if it succeeded
|
||||
bool LLEstateInfoModel::commitEstateInfoCaps()
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo");
|
||||
std::string url = gAgent.getRegionCapability("EstateChangeInfo");
|
||||
|
||||
if (url.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ BOOL LLPanelLandGeneral::postBuild()
|
|||
// note: on region change this will not be re checked, should not matter on Agni as
|
||||
// 99% of the time all regions will return the same caps. In case of an erroneous setting
|
||||
// to enabled the floater will just throw an error when trying to get it's cap
|
||||
std::string url = gAgent.getRegion()->getCapability("LandResources");
|
||||
std::string url = gAgent.getRegionCapability("LandResources");
|
||||
if (!url.empty())
|
||||
{
|
||||
if(mBtnScriptLimits)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ LLFloaterModelUploadBase::LLFloaterModelUploadBase(const LLSD& key)
|
|||
void LLFloaterModelUploadBase::requestAgentUploadPermissions()
|
||||
{
|
||||
std::string capability = "MeshUploadFlag";
|
||||
std::string url = gAgent.getRegion()->getCapability(capability);
|
||||
std::string url = gAgent.getRegionCapability(capability);
|
||||
|
||||
if (!url.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ BOOL LLFloaterRegionDebugConsole::postBuild()
|
|||
|
||||
mOutput = getChild<LLTextEditor>("region_debug_console_output");
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
std::string url = gAgent.getRegionCapability("SimConsoleAsync");
|
||||
if (url.empty())
|
||||
{
|
||||
// Fall back to see if the old API is supported.
|
||||
url = gAgent.getRegion()->getCapability("SimConsole");
|
||||
url = gAgent.getRegionCapability("SimConsole");
|
||||
if (url.empty())
|
||||
{
|
||||
mOutput->appendText(
|
||||
|
|
@ -139,11 +139,11 @@ void LLFloaterRegionDebugConsole::onInput(LLUICtrl* ctrl, const LLSD& param)
|
|||
LLLineEditor* input = static_cast<LLLineEditor*>(ctrl);
|
||||
std::string text = input->getText() + "\n";
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
std::string url = gAgent.getRegionCapability("SimConsoleAsync");
|
||||
if (url.empty())
|
||||
{
|
||||
// Fall back to the old API
|
||||
url = gAgent.getRegion()->getCapability("SimConsole");
|
||||
url = gAgent.getRegionCapability("SimConsole");
|
||||
if (url.empty())
|
||||
{
|
||||
text += CONSOLE_UNAVAILABLE + PROMPT;
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ BOOL LLFloaterRegionInfo::postBuild()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
if(!gAgent.getRegionCapability("RegionExperiences").empty())
|
||||
{
|
||||
panel = new LLPanelRegionExperiences;
|
||||
mInfoPanels.push_back(panel);
|
||||
|
|
@ -879,7 +879,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
|
|||
|
||||
void LLFloaterRegionInfo::requestMeshRezInfo()
|
||||
{
|
||||
std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
std::string sim_console_url = gAgent.getRegionCapability("SimConsoleAsync");
|
||||
|
||||
if (!sim_console_url.empty())
|
||||
{
|
||||
|
|
@ -907,7 +907,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
|
|||
|
||||
// First try using a Cap. If that fails use the old method.
|
||||
LLSD body;
|
||||
std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo");
|
||||
std::string url = gAgent.getRegionCapability("DispatchRegionInfo");
|
||||
if (!url.empty())
|
||||
{
|
||||
body["block_terraform"] = getChild<LLUICtrl>("block_terraform_check")->getValue();
|
||||
|
|
|
|||
|
|
@ -438,8 +438,8 @@ void LLFloaterReporter::onClickSend(void *userdata)
|
|||
|
||||
LLUploadDialog::modalUploadDialog(LLTrans::getString("uploading_abuse_report"));
|
||||
// *TODO don't upload image if checkbox isn't checked
|
||||
std::string url = gAgent.getRegion()->getCapability("SendUserReport");
|
||||
std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
|
||||
std::string url = gAgent.getRegionCapability("SendUserReport");
|
||||
std::string sshot_url = gAgent.getRegionCapability("SendUserReportWithScreenshot");
|
||||
if(!url.empty() || !sshot_url.empty())
|
||||
{
|
||||
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
|
||||
|
|
|
|||
|
|
@ -1892,7 +1892,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
|
|||
mOrigin = gAgent.getPositionAgent();
|
||||
mHost = gAgent.getRegionHost();
|
||||
|
||||
mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
|
||||
mWholeModelFeeCapability = gAgent.getRegionCapability("NewFileAgentInventory");
|
||||
|
||||
mOrigin += gAgent.getAtAxis() * scale.magVec();
|
||||
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ bool LLPanelWearing::populateAttachmentsList(bool update)
|
|||
void LLPanelWearing::requestAttachmentDetails()
|
||||
{
|
||||
LLSD body;
|
||||
std::string url = gAgent.getRegion()->getCapability("AttachmentResources");
|
||||
std::string url = gAgent.getRegionCapability("AttachmentResources");
|
||||
if (!url.empty())
|
||||
{
|
||||
LLCoros::instance().launch("LLPanelWearing::getAttachmentLimitsCoro",
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ LLProductInfoRequestManager::LLProductInfoRequestManager():
|
|||
|
||||
void LLProductInfoRequestManager::initSingleton()
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("ProductInfoRequest");
|
||||
std::string url = gAgent.getRegionCapability("ProductInfoRequest");
|
||||
if (!url.empty())
|
||||
{
|
||||
LLCoros::instance().launch("LLProductInfoRequestManager::getLandDescriptionsCoro",
|
||||
|
|
|
|||
|
|
@ -818,7 +818,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
|
|||
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
|
||||
if (!speakerp) return;
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
LLSD data;
|
||||
data["method"] = "mute update";
|
||||
data["session-id"] = getSessionID();
|
||||
|
|
@ -844,7 +844,7 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu
|
|||
// do not send voice moderation changes for avatars not in voice channel
|
||||
if (!is_in_voice) return;
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
LLSD data;
|
||||
data["method"] = "mute update";
|
||||
data["session-id"] = getSessionID();
|
||||
|
|
@ -924,7 +924,7 @@ void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update)
|
|||
|
||||
void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallow_voice)
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
LLSD data;
|
||||
data["method"] = "session update";
|
||||
data["session-id"] = session_id;
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ void upload_new_resource(
|
|||
// uploadInfo->setTransactionId(tid);
|
||||
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory");
|
||||
std::string url = gAgent.getRegionCapability("NewFileAgentInventory");
|
||||
|
||||
if ( !url.empty() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void *
|
|||
// *TODO: I can not find any active code where this method is called...
|
||||
void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url)
|
||||
{
|
||||
std::string region_url = gAgent.getRegion()->getCapability("ParcelNavigateMedia");
|
||||
std::string region_url = gAgent.getRegionCapability("ParcelNavigateMedia");
|
||||
if (!region_url.empty())
|
||||
{
|
||||
// send navigate event to sim for link sharing
|
||||
|
|
|
|||
|
|
@ -2744,7 +2744,7 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
|
|||
//------------------------------------------------------------------------
|
||||
void LLVOAvatarSelf::sendHoverHeight() const
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("AgentPreferences");
|
||||
std::string url = gAgent.getRegionCapability("AgentPreferences");
|
||||
|
||||
if (!url.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ void LLEnvironmentRequest::onRegionCapsReceived(const LLUUID& region_id)
|
|||
// static
|
||||
bool LLEnvironmentRequest::doRequest()
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("EnvironmentSettings");
|
||||
std::string url = gAgent.getRegionCapability("EnvironmentSettings");
|
||||
if (url.empty())
|
||||
{
|
||||
LL_INFOS("WindlightCaps") << "Skipping windlight setting request - we don't have this capability" << LL_ENDL;
|
||||
|
|
@ -162,7 +162,7 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content)
|
|||
sLastUpdate = current;
|
||||
|
||||
// Send update request.
|
||||
std::string url = gAgent.getRegion()->getCapability("EnvironmentSettings");
|
||||
std::string url = gAgent.getRegionCapability("EnvironmentSettings");
|
||||
if (url.empty())
|
||||
{
|
||||
LL_WARNS("WindlightCaps") << "Applying windlight settings not supported" << LL_ENDL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue