diff options
author | Merov Linden <merov@lindenlab.com> | 2014-06-17 11:12:27 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-06-17 11:12:27 -0700 |
commit | c4c8debfc230b4ec6d28c7a84cd2a9bb81d6c894 (patch) | |
tree | d01f663d3fc1562d773a229e943addb02d14089f /indra/newview/lluploadfloaterobservers.cpp | |
parent | 51865f4e94885471dba0402b33f0b11b72bbdb30 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/lluploadfloaterobservers.cpp')
-rwxr-xr-x | indra/newview/lluploadfloaterobservers.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/lluploadfloaterobservers.cpp b/indra/newview/lluploadfloaterobservers.cpp index 248f1bf1d5..69b9b1f9f1 100755 --- a/indra/newview/lluploadfloaterobservers.cpp +++ b/indra/newview/lluploadfloaterobservers.cpp @@ -1,6 +1,6 @@ /** * @file lluploadfloaterobservers.cpp - * @brief LLUploadModelPremissionsResponder definition + * @brief LLUploadModelPermissionsResponder definition * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code @@ -28,26 +28,31 @@ #include "lluploadfloaterobservers.h" -LLUploadModelPremissionsResponder::LLUploadModelPremissionsResponder(const LLHandle<LLUploadPermissionsObserver>& observer) +LLUploadModelPermissionsResponder::LLUploadModelPermissionsResponder(const LLHandle<LLUploadPermissionsObserver>& observer) :mObserverHandle(observer) { } -void LLUploadModelPremissionsResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) +void LLUploadModelPermissionsResponder::httpFailure() { - LL_WARNS() << "LLUploadModelPremissionsResponder error [status:" - << status << "]: " << content << LL_ENDL; + LL_WARNS() << dumpResponse() << LL_ENDL; LLUploadPermissionsObserver* observer = mObserverHandle.get(); if (observer) { - observer->setPermissonsErrorStatus(status, reason); + observer->setPermissonsErrorStatus(getStatus(), getReason()); } } -void LLUploadModelPremissionsResponder::result(const LLSD& content) +void LLUploadModelPermissionsResponder::httpSuccess() { + const LLSD& content = getContent(); + if (!content.isMap()) + { + failureResult(HTTP_INTERNAL_ERROR, "Malformed response contents", content); + return; + } LLUploadPermissionsObserver* observer = mObserverHandle.get(); if (observer) @@ -55,3 +60,4 @@ void LLUploadModelPremissionsResponder::result(const LLSD& content) observer->onPermissionsReceived(content); } } + |