From b4af7fe9d03b7a8a9999dcfec3ad85304faf5268 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 24 Jan 2018 17:30:56 -0800 Subject: Settins failure fix. --- indra/newview/llenvironment.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 3451b0efef..e64d71e228 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1009,14 +1009,12 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, LLSettingsDay::ptr_t pd LLSD httpResults = result["http_result"]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); - if (!status) + if ((!status) || !result["success"].asBoolean()) { LL_WARNS("WindlightCaps") << "Couldn't update Windlight settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL; - std::stringstream msg; - msg << status.toString() << " (Code " << status.toTerseString() << ")"; notify = LLSD::emptyMap(); - notify["FAIL_REASON"] = msg.str(); + notify["FAIL_REASON"] = result["message"].asString(); } else { @@ -1063,15 +1061,12 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, environment_apply_fn app LLSD httpResults = result["http_result"]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); - if (!status) + if ((!status) || !result["success"].asBoolean()) { - LL_WARNS("WindlightCaps") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL; + LL_WARNS("WindlightCaps") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL; - std::stringstream msg; - msg << status.toString() << " (Code " << status.toTerseString() << ")"; notify = LLSD::emptyMap(); - notify["FAIL_REASON"] = msg.str(); - + notify["FAIL_REASON"] = result["message"].asString(); } else { -- cgit v1.2.3