summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-07-13 15:04:18 -0400
committerOz Linden <oz@lindenlab.com>2013-07-13 15:04:18 -0400
commit3e6ce2dbad485b1df10414dcb2ee0ee935da2750 (patch)
treeff6d35acc721e1928683be8b12bb2a9ea123c23d
parentd2dd3be08b3d460054366a66481bcf3110005291 (diff)
add some validation of update response before starting download
-rwxr-xr-xindra/viewer_components/updater/llupdaterservice.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp
index 522c4a54b5..16950e1d62 100755
--- a/indra/viewer_components/updater/llupdaterservice.cpp
+++ b/indra/viewer_components/updater/llupdaterservice.cpp
@@ -406,7 +406,7 @@ void LLUpdaterServiceImpl::response(LLSD const & content)
setState(LLUpdaterService::UP_TO_DATE);
}
- else
+ else if ( content.isMap() && content.has("url") )
{
// there is an update available...
stopTimer();
@@ -430,6 +430,12 @@ void LLUpdaterServiceImpl::response(LLSD const & content)
<< LL_ENDL;
mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required);
}
+ else
+ {
+ LL_WARNS("UpdaterService") << "Invalid update query response ignored; retry in "
+ << mCheckPeriod << " seconds" << LL_ENDL;
+ restartTimer(mCheckPeriod);
+ }
}
void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
@@ -570,6 +576,10 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
<< "No updater service defined for grid '" << LLGridManager::getInstance()->getGrid()
<< "' will check again in " << mCheckPeriod << " seconds"
<< LL_ENDL;
+ // Because the grid can be changed after the viewer is started (when the first check takes place)
+ // but before the user logs in, the next check may be on a different grid, so set the retry timer
+ // even though this check did not happen. The default time is once an hour, and if we're not
+ // doing the check anyway the performance impact is completely insignificant.
restartTimer(mCheckPeriod);
}
}