diff options
Diffstat (limited to 'indra/viewer_components')
-rw-r--r-- | indra/viewer_components/updater/llupdatechecker.cpp | 18 | ||||
-rw-r--r-- | indra/viewer_components/updater/llupdatechecker.h | 7 |
2 files changed, 12 insertions, 13 deletions
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp index 5edbbf9914..49b404a7ad 100644 --- a/indra/viewer_components/updater/llupdatechecker.cpp +++ b/indra/viewer_components/updater/llupdatechecker.cpp @@ -106,15 +106,14 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & protocolV mHttpClient.get(checkUrl, this); } -void LLUpdateChecker::Implementation::completed(U32 status, - const std::string & reason, - const LLSD & content) +void LLUpdateChecker::Implementation::httpCompleted() { - mInProgress = false; - - if(status != 200) { - LL_WARNS("UpdateCheck") << "html error " << status << " (" << reason << ")" << llendl; - mClient.error(reason); + mInProgress = false; + + const LLSD& content = getContent(); + if(getStatus() != HTTP_OK) { + LL_WARNS("UpdateCheck") << "html error " << dumpResponse() << LL_ENDL; + mClient.error(getReason()); } else if(!content.asBoolean()) { LL_INFOS("UpdateCheck") << "up to date" << llendl; mClient.upToDate(); @@ -130,8 +129,9 @@ void LLUpdateChecker::Implementation::completed(U32 status, } -void LLUpdateChecker::Implementation::error(U32 status, const std::string & reason) +void LLUpdateChecker::Implementation::httpFailure() { + const std::string& reason = getReason(); mInProgress = false; LL_WARNS("UpdateCheck") << "update check failed; " << reason << llendl; mClient.error(reason); diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index 23f62a7c5e..3ecd6230be 100644 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -47,11 +47,10 @@ public: void checkVersion(std::string const & protocolVersion, std::string const & hostUrl, std::string const & servicePath, std::string channel, std::string version); + protected: // Responder: - virtual void completed(U32 status, - const std::string & reason, - const LLSD& content); - virtual void error(U32 status, const std::string & reason); + virtual void httpCompleted(); + virtual void httpFailure(); private: static const char * sProtocolVersion; |