summaryrefslogtreecommitdiff
path: root/indra/viewer_components/updater/llupdatechecker.cpp
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-11-04 11:33:02 -0700
committerAndrew A. de Laix <alain@lindenlab.com>2010-11-04 11:33:02 -0700
commit7622ab9249506539894d0e33d4c2a8fd9fb3e3ac (patch)
treebb3624f4f01e5ef4f6a59a9356d560e3dd049db5 /indra/viewer_components/updater/llupdatechecker.cpp
parent0f6c3a167850a34bad9982ed29eb25c141845320 (diff)
just barely working udate downloading service; missing little nicities like error checking and sill stuff like that.
Diffstat (limited to 'indra/viewer_components/updater/llupdatechecker.cpp')
-rw-r--r--indra/viewer_components/updater/llupdatechecker.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index 9cfa919b39..596b122a25 100644
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -120,17 +120,19 @@ void LLUpdateChecker::Implementation::completed(U32 status,
const std::string & reason,
const LLSD & content)
{
- mInProgress = false;
+ mInProgress = false;
if(status != 200) {
LL_WARNS("UpdateCheck") << "html error " << status << " (" << reason << ")" << llendl;
mClient.error(reason);
} else if(!content["valid"].asBoolean()) {
LL_INFOS("UpdateCheck") << "version invalid" << llendl;
- mClient.requiredUpdate(content["latest_version"].asString());
+ LLURI uri(content["download_url"].asString());
+ mClient.requiredUpdate(content["latest_version"].asString(), uri);
} else if(content["latest_version"].asString() != mVersion) {
LL_INFOS("UpdateCheck") << "newer version " << content["latest_version"].asString() << " available" << llendl;
- mClient.optionalUpdate(content["latest_version"].asString());
+ LLURI uri(content["download_url"].asString());
+ mClient.optionalUpdate(content["latest_version"].asString(), uri);
} else {
LL_INFOS("UpdateCheck") << "up to date" << llendl;
mClient.upToDate();
@@ -153,4 +155,3 @@ std::string LLUpdateChecker::Implementation::buildUrl(std::string const & host,
path.append(version);
return LLURI::buildHTTP(host, path).asString();
}
-