diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-12-13 13:32:20 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-12-13 13:32:20 +0200 |
commit | dec231827b896d64e068b074d371774293cb8b37 (patch) | |
tree | acaa85ab0f5f21a4d26db8a7728932f7f2e0163c | |
parent | 9407637c5383bd0c3739f1ff4e0ac6ceeb579208 (diff) |
SL-14543 Fix reason in environments 'settings couldn't be applied' error
-rw-r--r-- | indra/newview/llenvironment.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index e56ed92d9e..13e29b90fc 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -2007,7 +2007,15 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf LL_WARNS("ENVIRONMENT") << "Couldn't update Windlight settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL; notify = LLSD::emptyMap(); - notify["FAIL_REASON"] = result["message"].asString(); + std::string reason = result["message"].asString(); + if (reason.empty()) + { + notify["FAIL_REASON"] = status.toString(); + } + else + { + notify["FAIL_REASON"] = reason; + } } else { @@ -2069,7 +2077,15 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen LL_WARNS("ENVIRONMENT") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL; notify = LLSD::emptyMap(); - notify["FAIL_REASON"] = result["message"].asString(); + std::string reason = result["message"].asString(); + if (reason.empty()) + { + notify["FAIL_REASON"] = status.toString(); + } + else + { + notify["FAIL_REASON"] = reason; + } } else { |