summaryrefslogtreecommitdiff
path: root/indra/viewer_components
diff options
context:
space:
mode:
Diffstat (limited to 'indra/viewer_components')
-rw-r--r--indra/viewer_components/updater/CMakeLists.txt1
-rw-r--r--indra/viewer_components/updater/llupdatechecker.cpp119
-rw-r--r--indra/viewer_components/updater/llupdatechecker.h49
-rw-r--r--indra/viewer_components/updater/llupdatedownloader.cpp26
-rw-r--r--indra/viewer_components/updater/llupdateinstaller.cpp2
-rw-r--r--indra/viewer_components/updater/llupdaterservice.cpp77
-rw-r--r--indra/viewer_components/updater/llupdaterservice.h14
-rw-r--r--indra/viewer_components/updater/tests/llupdaterservice_test.cpp18
8 files changed, 214 insertions, 92 deletions
diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt
index 4343f39e76..c5c78728e7 100644
--- a/indra/viewer_components/updater/CMakeLists.txt
+++ b/indra/viewer_components/updater/CMakeLists.txt
@@ -19,6 +19,7 @@ include_directories(
${LLPLUGIN_INCLUDE_DIRS}
${LLVFS_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/newview
)
set(updater_service_SOURCE_FILES
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index 5edbbf9914..6d0758b226 100644
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -62,10 +62,15 @@ LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client):
}
-void LLUpdateChecker::checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version)
+void LLUpdateChecker::checkVersion(std::string const & hostUrl,
+ std::string const & servicePath,
+ std::string const & channel,
+ std::string const & version,
+ std::string const & platform_version,
+ unsigned char uniqueid[MD5HEX_STR_SIZE],
+ bool willing_to_test)
{
- mImplementation->checkVersion(protocolVersion, hostUrl, servicePath, channel, version);
+ mImplementation->checkVersion(hostUrl, servicePath, channel, version, platform_version, uniqueid, willing_to_test);
}
@@ -74,12 +79,14 @@ void LLUpdateChecker::checkVersion(std::string const & protocolVersion, std::str
//-----------------------------------------------------------------------------
-const char * LLUpdateChecker::Implementation::sProtocolVersion = "v1.0";
+const char * LLUpdateChecker::Implementation::sLegacyProtocolVersion = "v1.0";
+const char * LLUpdateChecker::Implementation::sProtocolVersion = "v1.1";
LLUpdateChecker::Implementation::Implementation(LLUpdateChecker::Client & client):
mClient(client),
- mInProgress(false)
+ mInProgress(false),
+ mProtocol(sProtocolVersion)
{
; // No op.
}
@@ -91,39 +98,86 @@ LLUpdateChecker::Implementation::~Implementation()
}
-void LLUpdateChecker::Implementation::checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version)
+void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
+ std::string const & servicePath,
+ std::string const & channel,
+ std::string const & version,
+ std::string const & platform_version,
+ unsigned char uniqueid[MD5HEX_STR_SIZE],
+ bool willing_to_test)
{
llassert(!mInProgress);
- if(protocolVersion != sProtocolVersion) throw CheckError("unsupported protocol");
-
mInProgress = true;
- mVersion = version;
- std::string checkUrl = buildUrl(protocolVersion, hostUrl, servicePath, channel, version);
- LL_INFOS("UpdateCheck") << "checking for updates at " << checkUrl << llendl;
+
+ mHostUrl = hostUrl;
+ mServicePath = servicePath;
+ mChannel = channel;
+ mVersion = version;
+ mPlatformVersion = platform_version;
+ memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
+ mWillingToTest = willing_to_test;
+
+ mProtocol = sProtocolVersion;
+
+ std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform_version, uniqueid, willing_to_test);
+ LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL;
mHttpClient.get(checkUrl, this);
}
void LLUpdateChecker::Implementation::completed(U32 status,
- const std::string & reason,
- const LLSD & content)
+ const std::string & reason,
+ const LLSD & content)
{
mInProgress = false;
- if(status != 200) {
- LL_WARNS("UpdateCheck") << "html error " << status << " (" << reason << ")" << llendl;
- mClient.error(reason);
- } else if(!content.asBoolean()) {
- LL_INFOS("UpdateCheck") << "up to date" << llendl;
+ if(status != 200)
+ {
+ if (status == 404)
+ {
+ if (mProtocol == sProtocolVersion)
+ {
+ mProtocol = sLegacyProtocolVersion;
+ std::string retryUrl = buildUrl(mHostUrl, mServicePath, mChannel, mVersion, mPlatformVersion, mUniqueId, mWillingToTest);
+
+ LL_WARNS("UpdaterService")
+ << "update response using " << sProtocolVersion
+ << " was 404... retry at " << retryUrl
+ << " with legacy protocol"
+ << LL_ENDL;
+
+ mHttpClient.get(retryUrl, this);
+ }
+ else
+ {
+ LL_WARNS("UpdaterService")
+ << "update response using " << sLegacyProtocolVersion
+ << " was 404; request failed"
+ << LL_ENDL;
+ mClient.error(reason);
+ }
+ }
+ else
+ {
+ LL_WARNS("UpdaterService") << "response error " << status << " (" << reason << ")" << LL_ENDL;
+ mClient.error(reason);
+ }
+ }
+ else if(!content.asBoolean())
+ {
+ LL_INFOS("UpdaterService") << "up to date" << LL_ENDL;
mClient.upToDate();
- } else if(content["required"].asBoolean()) {
- LL_INFOS("UpdateCheck") << "version invalid" << llendl;
+ }
+ else if(content["required"].asBoolean())
+ {
+ LL_INFOS("UpdaterService") << "version invalid" << LL_ENDL;
LLURI uri(content["url"].asString());
mClient.requiredUpdate(content["version"].asString(), uri, content["hash"].asString());
- } else {
- LL_INFOS("UpdateCheck") << "newer version " << content["version"].asString() << " available" << llendl;
+ }
+ else
+ {
+ LL_INFOS("UpdaterService") << "newer version " << content["version"].asString() << " available" << LL_ENDL;
LLURI uri(content["url"].asString());
mClient.optionalUpdate(content["version"].asString(), uri, content["hash"].asString());
}
@@ -133,13 +187,18 @@ void LLUpdateChecker::Implementation::completed(U32 status,
void LLUpdateChecker::Implementation::error(U32 status, const std::string & reason)
{
mInProgress = false;
- LL_WARNS("UpdateCheck") << "update check failed; " << reason << llendl;
+ LL_WARNS("UpdaterService") << "update check failed; " << reason << LL_ENDL;
mClient.error(reason);
}
-std::string LLUpdateChecker::Implementation::buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version)
+std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUrl,
+ std::string const & servicePath,
+ std::string const & channel,
+ std::string const & version,
+ std::string const & platform_version,
+ unsigned char uniqueid[MD5HEX_STR_SIZE],
+ bool willing_to_test)
{
#ifdef LL_WINDOWS
static const char * platform = "win";
@@ -162,9 +221,15 @@ std::string LLUpdateChecker::Implementation::buildUrl(std::string const & protoc
LLSD path;
path.append(servicePath);
- path.append(protocolVersion);
+ path.append(mProtocol);
path.append(channel);
path.append(version);
path.append(platform);
+ if (mProtocol != sLegacyProtocolVersion)
+ {
+ path.append(platform_version);
+ path.append(willing_to_test ? "testok" : "testno");
+ path.append((char*)uniqueid);
+ }
return LLURI::buildHTTP(hostUrl, path).asString();
}
diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h
index 23f62a7c5e..b60f21549e 100644
--- a/indra/viewer_components/updater/llupdatechecker.h
+++ b/indra/viewer_components/updater/llupdatechecker.h
@@ -29,6 +29,7 @@
#include <boost/shared_ptr.hpp>
+#include "llmd5.h"
#include "llhttpclient.h"
//
@@ -37,15 +38,19 @@
class LLUpdateChecker {
public:
class Client;
- class Implementation:
-
- public LLHTTPClient::Responder
+ class Implementation: public LLHTTPClient::Responder
{
public:
Implementation(Client & client);
~Implementation();
- void checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version);
+ void checkVersion(std::string const & hostUrl,
+ std::string const & servicePath,
+ std::string const & channel,
+ std::string const & version,
+ std::string const & platform_version,
+ unsigned char uniqueid[MD5HEX_STR_SIZE],
+ bool willing_to_test
+ );
// Responder:
virtual void completed(U32 status,
@@ -54,15 +59,28 @@ public:
virtual void error(U32 status, const std::string & reason);
private:
+ static const char * sLegacyProtocolVersion;
static const char * sProtocolVersion;
-
+ const char* mProtocol;
+
Client & mClient;
LLHTTPClient mHttpClient;
- bool mInProgress;
- std::string mVersion;
-
- std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version);
+ bool mInProgress;
+ std::string mVersion;
+ std::string mHostUrl;
+ std::string mServicePath;
+ std::string mChannel;
+ std::string mPlatformVersion;
+ unsigned char mUniqueId[MD5HEX_STR_SIZE];
+ bool mWillingToTest;
+
+ std::string buildUrl(std::string const & hostUrl,
+ std::string const & servicePath,
+ std::string const & channel,
+ std::string const & version,
+ std::string const & platform_version,
+ unsigned char uniqueid[MD5HEX_STR_SIZE],
+ bool willing_to_test);
LOG_CLASS(LLUpdateChecker::Implementation);
};
@@ -74,8 +92,13 @@ public:
LLUpdateChecker(Client & client);
// Check status of current app on the given host for the channel and version provided.
- void checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version);
+ void checkVersion(std::string const & hostUrl,
+ std::string const & servicePath,
+ std::string const & channel,
+ std::string const & version,
+ std::string const & platform_version,
+ unsigned char uniqueid[MD5HEX_STR_SIZE],
+ bool willing_to_test);
private:
LLPointer<Implementation> mImplementation;
diff --git a/indra/viewer_components/updater/llupdatedownloader.cpp b/indra/viewer_components/updater/llupdatedownloader.cpp
index 75e455e3f6..001dd5ed16 100644
--- a/indra/viewer_components/updater/llupdatedownloader.cpp
+++ b/indra/viewer_components/updater/llupdatedownloader.cpp
@@ -301,7 +301,7 @@ void LLUpdateDownloader::Implementation::setBandwidthLimit(U64 bytesPerSecond)
llassert(mCurl != 0);
mBandwidthLimit = bytesPerSecond;
CURLcode code = curl_easy_setopt(mCurl, CURLOPT_MAX_RECV_SPEED_LARGE, &mBandwidthLimit);
- if(code != CURLE_OK) LL_WARNS("UpdateDownload") <<
+ if(code != CURLE_OK) LL_WARNS("UpdaterService") <<
"unable to change dowload bandwidth" << LL_ENDL;
} else {
mBandwidthLimit = bytesPerSecond;
@@ -322,13 +322,13 @@ size_t LLUpdateDownloader::Implementation::onHeader(void * buffer, size_t size)
size_t lastDigitPos = header.find_last_of("0123456789");
std::string contentLength = header.substr(firstDigitPos, lastDigitPos - firstDigitPos + 1);
size_t size = boost::lexical_cast<size_t>(contentLength);
- LL_INFOS("UpdateDownload") << "download size is " << size << LL_ENDL;
+ LL_INFOS("UpdaterService") << "download size is " << size << LL_ENDL;
mDownloadData["size"] = LLSD(LLSD::Integer(size));
llofstream odataStream(mDownloadRecordPath);
LLSDSerialize::toPrettyXML(mDownloadData, odataStream);
} catch (std::exception const & e) {
- LL_WARNS("UpdateDownload") << "unable to read content length ("
+ LL_WARNS("UpdaterService") << "unable to read content length ("
<< e.what() << ")" << LL_ENDL;
}
} else {
@@ -368,7 +368,7 @@ int LLUpdateDownloader::Implementation::onProgress(double downloadSize, double b
event["payload"] = payload;
LLEventPumps::instance().obtain("mainlooprepeater").post(event);
- LL_INFOS("UpdateDownload") << "progress event " << payload << LL_ENDL;
+ LL_INFOS("UpdaterService") << "progress event " << payload << LL_ENDL;
} else {
; // Keep events to a reasonalbe number.
}
@@ -384,19 +384,19 @@ void LLUpdateDownloader::Implementation::run(void)
if(code == CURLE_OK) {
LLFile::remove(mDownloadRecordPath);
if(validateDownload()) {
- LL_INFOS("UpdateDownload") << "download successful" << LL_ENDL;
+ LL_INFOS("UpdaterService") << "download successful" << LL_ENDL;
mClient.downloadComplete(mDownloadData);
} else {
- LL_INFOS("UpdateDownload") << "download failed hash check" << LL_ENDL;
+ LL_INFOS("UpdaterService") << "download failed hash check" << LL_ENDL;
std::string filePath = mDownloadData["path"].asString();
if(filePath.size() != 0) LLFile::remove(filePath);
mClient.downloadError("failed hash check");
}
} else if(mCancelled && (code == CURLE_WRITE_ERROR)) {
- LL_INFOS("UpdateDownload") << "download canceled by user" << LL_ENDL;
+ LL_INFOS("UpdaterService") << "download canceled by user" << LL_ENDL;
// Do not call back client.
} else {
- LL_WARNS("UpdateDownload") << "download failed with error '" <<
+ LL_WARNS("UpdaterService") << "download failed with error '" <<
curl_easy_strerror(code) << "'" << LL_ENDL;
LLFile::remove(mDownloadRecordPath);
if(mDownloadData.has("path")) LLFile::remove(mDownloadData["path"].asString());
@@ -446,7 +446,7 @@ void LLUpdateDownloader::Implementation::initializeCurlGet(std::string const & u
void LLUpdateDownloader::Implementation::resumeDownloading(size_t startByte)
{
- LL_INFOS("UpdateDownload") << "resuming download from " << mDownloadData["url"].asString()
+ LL_INFOS("UpdaterService") << "resuming download from " << mDownloadData["url"].asString()
<< " at byte " << startByte << LL_ENDL;
initializeCurlGet(mDownloadData["url"].asString(), false);
@@ -476,9 +476,9 @@ void LLUpdateDownloader::Implementation::startDownloading(LLURI const & uri, std
std::string filePath = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, fileName);
mDownloadData["path"] = filePath;
- LL_INFOS("UpdateDownload") << "downloading " << filePath
+ LL_INFOS("UpdaterService") << "downloading " << filePath
<< " from " << uri.asString() << LL_ENDL;
- LL_INFOS("UpdateDownload") << "hash of file is " << hash << LL_ENDL;
+ LL_INFOS("UpdaterService") << "hash of file is " << hash << LL_ENDL;
llofstream dataStream(mDownloadRecordPath);
LLSDSerialize::toPrettyXML(mDownloadData, dataStream);
@@ -512,11 +512,11 @@ bool LLUpdateDownloader::Implementation::validateDownload(void)
std::string hash = mDownloadData["hash"].asString();
if(hash.size() != 0) {
- LL_INFOS("UpdateDownload") << "checking hash..." << LL_ENDL;
+ LL_INFOS("UpdaterService") << "checking hash..." << LL_ENDL;
char digest[33];
LLMD5(fileStream).hex_digest(digest);
if(hash != digest) {
- LL_WARNS("UpdateDownload") << "download hash mismatch; expeted " << hash <<
+ LL_WARNS("UpdaterService") << "download hash mismatch; expeted " << hash <<
" but download is " << digest << LL_ENDL;
}
return hash == digest;
diff --git a/indra/viewer_components/updater/llupdateinstaller.cpp b/indra/viewer_components/updater/llupdateinstaller.cpp
index 2f87d59373..a0e2c0b362 100644
--- a/indra/viewer_components/updater/llupdateinstaller.cpp
+++ b/indra/viewer_components/updater/llupdateinstaller.cpp
@@ -75,7 +75,7 @@ int ll_install_update(std::string const & script,
llassert(!"unpossible copy mode");
}
- llinfos << "UpdateInstaller: installing " << updatePath << " using " <<
+ LL_INFOS("Updater") << "UpdateInstaller: installing " << updatePath << " using " <<
actualScriptPath << LL_ENDL;
LLProcess::Params params;
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp
index d783360f80..c6c89655d3 100644
--- a/indra/viewer_components/updater/llupdaterservice.cpp
+++ b/indra/viewer_components/updater/llupdaterservice.cpp
@@ -88,11 +88,14 @@ class LLUpdaterServiceImpl :
{
static const std::string sListenerName;
- std::string mProtocolVersion;
- std::string mUrl;
- std::string mPath;
- std::string mChannel;
- std::string mVersion;
+ std::string mProtocolVersion;
+ std::string mUrl;
+ std::string mPath;
+ std::string mChannel;
+ std::string mVersion;
+ std::string mPlatformVersion;
+ unsigned char mUniqueId[MD5HEX_STR_SIZE];
+ bool mWillingToTest;
unsigned int mCheckPeriod;
bool mIsChecking;
@@ -112,11 +115,14 @@ public:
LLUpdaterServiceImpl();
virtual ~LLUpdaterServiceImpl();
- void initialize(const std::string& protocol_version,
- const std::string& url,
- const std::string& path,
- const std::string& channel,
- const std::string& version);
+ void initialize(const std::string& url,
+ const std::string& path,
+ const std::string& channel,
+ const std::string& version,
+ const std::string& platform_version,
+ const unsigned char uniqueid[MD5HEX_STR_SIZE],
+ const bool& willing_to_test
+ );
void setCheckPeriod(unsigned int seconds);
void setBandwidthLimit(U64 bytesPerSecond);
@@ -174,11 +180,13 @@ LLUpdaterServiceImpl::~LLUpdaterServiceImpl()
LLEventPumps::instance().obtain("mainloop").stopListening(sListenerName);
}
-void LLUpdaterServiceImpl::initialize(const std::string& protocol_version,
- const std::string& url,
- const std::string& path,
- const std::string& channel,
- const std::string& version)
+void LLUpdaterServiceImpl::initialize(const std::string& url,
+ const std::string& path,
+ const std::string& channel,
+ const std::string& version,
+ const std::string & platform_version,
+ const unsigned char uniqueid[MD5HEX_STR_SIZE],
+ const bool& willing_to_test)
{
if(mIsChecking || mIsDownloading)
{
@@ -186,11 +194,21 @@ void LLUpdaterServiceImpl::initialize(const std::string& protocol_version,
"while updater is running.");
}
- mProtocolVersion = protocol_version;
mUrl = url;
mPath = path;
mChannel = channel;
mVersion = version;
+ mPlatformVersion = platform_version;
+ memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
+ mWillingToTest = willing_to_test;
+ LL_DEBUGS("UpdaterService")
+ << "\n url: " << mUrl
+ << "\n path: " << mPath
+ << "\n channel: " << mChannel
+ << "\n version: " << mVersion
+ << "\n uniqueid: " << mUniqueId
+ << "\n willing: " << ( mWillingToTest ? "testok" : "testno" )
+ << LL_ENDL;
}
void LLUpdaterServiceImpl::setCheckPeriod(unsigned int seconds)
@@ -289,7 +307,7 @@ bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
// the update. Do not install this update.
if(!path.asString().empty())
{
- llinfos << "ignoring update dowloaded by different client version" << llendl;
+ LL_INFOS("UpdaterService") << "ignoring update dowloaded by different client version" << LL_ENDL;;
LLFile::remove(path.asString());
LLFile::remove(update_marker_path());
}
@@ -317,7 +335,7 @@ bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
{
mAppExitCallback();
} else if(result != 0) {
- llwarns << "failed to run update install script" << LL_ENDL;
+ LL_WARNS("UpdaterService") << "failed to run update install script" << LL_ENDL;
} else {
; // No op.
}
@@ -352,7 +370,7 @@ bool LLUpdaterServiceImpl::checkForResume()
else
{
// The viewer that started this download is not the same as this viewer; ignore.
- llinfos << "ignoring partial download from different viewer version" << llendl;
+ LL_INFOS("UpdaterService") << "ignoring partial download from different viewer version" << LL_ENDL;;
std::string path = download_info["path"].asString();
if(!path.empty()) LLFile::remove(path);
LLFile::remove(download_marker_path);
@@ -501,8 +519,8 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
if(stream.fail()) requiredValue = 0;
}
// TODO: notify the user.
- llinfos << "found marker " << ll_install_failed_marker_path() << llendl;
- llinfos << "last install attempt failed" << llendl;
+ LL_INFOS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;;
+ LL_INFOS("UpdaterService") << "last install attempt failed" << LL_ENDL;;
LLFile::remove(ll_install_failed_marker_path());
LLSD event;
@@ -514,7 +532,7 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
}
else
{
- mUpdateChecker.checkVersion(mProtocolVersion, mUrl, mPath, mChannel, mVersion);
+ mUpdateChecker.checkVersion(mUrl, mPath, mChannel, mVersion, mPlatformVersion, mUniqueId, mWillingToTest);
setState(LLUpdaterService::CHECKING_FOR_UPDATE);
}
}
@@ -559,13 +577,16 @@ LLUpdaterService::~LLUpdaterService()
{
}
-void LLUpdaterService::initialize(const std::string& protocol_version,
- const std::string& url,
- const std::string& path,
- const std::string& channel,
- const std::string& version)
+void LLUpdaterService::initialize(const std::string& url,
+ const std::string& path,
+ const std::string& channel,
+ const std::string& version,
+ const std::string& platform_version,
+ const unsigned char uniqueid[MD5HEX_STR_SIZE],
+ const bool& willing_to_test
+)
{
- mImpl->initialize(protocol_version, url, path, channel, version);
+ mImpl->initialize(url, path, channel, version, platform_version, uniqueid, willing_to_test);
}
void LLUpdaterService::setCheckPeriod(unsigned int seconds)
diff --git a/indra/viewer_components/updater/llupdaterservice.h b/indra/viewer_components/updater/llupdaterservice.h
index 450f19c1c6..48d3590f1b 100644
--- a/indra/viewer_components/updater/llupdaterservice.h
+++ b/indra/viewer_components/updater/llupdaterservice.h
@@ -28,6 +28,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
+#include "llhasheduniqueid.h"
class LLUpdaterServiceImpl;
@@ -70,11 +71,14 @@ public:
LLUpdaterService();
~LLUpdaterService();
- void initialize(const std::string& protocol_version,
- const std::string& url,
- const std::string& path,
- const std::string& channel,
- const std::string& version);
+ void initialize(const std::string& url,
+ const std::string& path,
+ const std::string& channel,
+ const std::string& version,
+ const std::string& platform_version,
+ const unsigned char uniqueid[MD5HEX_STR_SIZE],
+ const bool& willing_to_test
+ );
void setCheckPeriod(unsigned int seconds);
void setBandwidthLimit(U64 bytesPerSecond);
diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
index a49bc4161e..ddaaccc051 100644
--- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
+++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
@@ -44,8 +44,13 @@
*****************************************************************************/
LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client)
{}
-void LLUpdateChecker::checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version)
+void LLUpdateChecker::checkVersion(std::string const & hostUrl,
+ std::string const & servicePath,
+ std::string const & channel,
+ std::string const & version,
+ std::string const & platform_version,
+ unsigned char uniqueid[MD5HEX_STR_SIZE],
+ bool willing_to_test)
{}
LLUpdateDownloader::LLUpdateDownloader(Client & ) {}
void LLUpdateDownloader::download(LLURI const & , std::string const &, std::string const &, bool){}
@@ -171,9 +176,11 @@ namespace tut
bool got_usage_error = false;
try
{
- updater.initialize("1.0",test_url, "update" ,test_channel, test_version);
+ unsigned char id1[MD5HEX_STR_SIZE] = "11111111111111111111111111111111";
+ updater.initialize(test_url, "update" ,test_channel, test_version, "1.2.3", id1, true);
updater.startChecking();
- updater.initialize("1.0", "other_url", "update", test_channel, test_version);
+ unsigned char id2[MD5HEX_STR_SIZE] = "22222222222222222222222222222222";
+ updater.initialize("other_url", "update", test_channel, test_version, "4.5.6", id2, true);
}
catch(LLUpdaterService::UsageError)
{
@@ -187,7 +194,8 @@ namespace tut
{
DEBUG;
LLUpdaterService updater;
- updater.initialize("1.0", test_url, "update", test_channel, test_version);
+ unsigned char id[MD5HEX_STR_SIZE] = "33333333333333333333333333333333";
+ updater.initialize(test_url, "update", test_channel, test_version, "7.8.9", id, true);
updater.startChecking();
ensure(updater.isChecking());
updater.stopChecking();