diff options
Diffstat (limited to 'indra/newview/llproductinforequest.cpp')
-rwxr-xr-x | indra/newview/llproductinforequest.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp index 1390000fc5..e92bf4590d 100755 --- a/indra/newview/llproductinforequest.cpp +++ b/indra/newview/llproductinforequest.cpp @@ -35,18 +35,24 @@ class LLProductInfoRequestResponder : public LLHTTPClient::Responder { -public: + LOG_CLASS(LLProductInfoRequestResponder); +private: //If we get back a normal response, handle it here - virtual void result(const LLSD& content) + /* virtual */ void httpSuccess() { - LLProductInfoRequestManager::instance().setSkuDescriptions(content); + const LLSD& content = getContent(); + if (!content.isArray()) + { + failureResult(HTTP_INTERNAL_ERROR, "Malformed response contents", content); + return; + } + LLProductInfoRequestManager::instance().setSkuDescriptions(getContent()); } //If we get back an error (not found, etc...), handle it here - virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content) + /* virtual */ void httpFailure() { - llwarns << "LLProductInfoRequest error [status:" - << status << ":] " << content << llendl; + LL_WARNS() << dumpResponse() << LL_ENDL; } }; @@ -76,7 +82,7 @@ std::string LLProductInfoRequestManager::getDescriptionForSku(const std::string& it != mSkuDescriptions.endArray(); ++it) { - // llwarns << (*it)["sku"].asString() << " = " << (*it)["description"].asString() << llendl; + // LL_WARNS() << (*it)["sku"].asString() << " = " << (*it)["description"].asString() << LL_ENDL; if ((*it)["sku"].asString() == sku) { return (*it)["description"].asString(); |