Put FSDATA version code in llversioninfo.cpp with the other version code.
parent
bdd051e4e6
commit
cc720a6f13
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "fsdata.h"
|
||||
#include "fscommon.h"
|
||||
#include "fsversionvalues.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
|
||||
/* boost: will not compile unless equivalent is undef'd, beware. */
|
||||
|
|
@ -54,7 +53,6 @@
|
|||
#include "llviewernetwork.h"
|
||||
#include "llxorcipher.h"
|
||||
|
||||
const std::string VERSION_ID = llformat("%s %d.%d.%d (%d)", LL_VIEWER_CHANNEL, LL_VIEWER_VERSION_MAJOR, LL_VIEWER_VERSION_MINOR, LL_VIEWER_VERSION_PATCH, LL_VIEWER_VERSION_BUILD);
|
||||
const std::string FSDATA_URL = "http://phoenixviewer.com/app/fsdatatest/data.xml";
|
||||
const std::string AGENTS_URL = "http://phoenixviewer.com/app/fsdatatest/agents.xml";
|
||||
const std::string LEGACY_CLIENT_LIST_URL = "http://phoenixviewer.com/app/client_tags/client_list_v2.xml";
|
||||
|
|
@ -110,7 +108,7 @@ FSData::FSData() :
|
|||
mAgentsDone(false)
|
||||
{
|
||||
mHeaders.insert("User-Agent", LLViewerMedia::getCurrentUserAgent());
|
||||
mHeaders.insert("viewer-version", VERSION_ID);
|
||||
mHeaders.insert("viewer-version", LLVersionInfo::getChannelAndVersionFS());
|
||||
}
|
||||
|
||||
void FSData::processResponder(const LLSD& content, const std::string& url, bool save_to_file, const LLDate& last_modified)
|
||||
|
|
@ -679,7 +677,7 @@ bool FSData::isDeveloper(LLUUID avatar_id)
|
|||
|
||||
LLSD FSData::allowedLogin()
|
||||
{
|
||||
std::map<std::string, LLSD>::iterator iter = mBlockedVersions.find(VERSION_ID);
|
||||
std::map<std::string, LLSD>::iterator iter = mBlockedVersions.find(LLVersionInfo::getChannelAndVersionFS());
|
||||
if (iter == mBlockedVersions.end())
|
||||
{
|
||||
return LLSD();
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@
|
|||
// <FS:TS> Define the version and channel substitution macros here instead
|
||||
// of via cmake compile-time defines in order to not force a rebuild
|
||||
// of the entire newview directory with every Mercurial pull
|
||||
// NOTE: This file should not be included anywhere in the main viewer code
|
||||
// but llversioninfo.cpp. If you need the current viewer version in
|
||||
// a different format than is already provided there, then add a
|
||||
// function to that file and reference it, rather than building your
|
||||
// own function elsewhere.
|
||||
#define LL_VIEWER_CHANNEL "@VIEWER_CHANNEL@"
|
||||
#define LL_VIEWER_VERSION_MAJOR @VIEWER_VERSION_MAJOR@
|
||||
#define LL_VIEWER_VERSION_MINOR @VIEWER_VERSION_MINOR@
|
||||
|
|
|
|||
|
|
@ -112,6 +112,11 @@ namespace
|
|||
// Storage for the "version and channel" string.
|
||||
// This will get reset too.
|
||||
std::string sVersionChannel("");
|
||||
|
||||
//<FS:TS> Same as above, with version number in Firestorm FSDATA
|
||||
// format. Unlike the above, the channel name will always be the
|
||||
// hardcoded version.
|
||||
std::string sVersionChannelFS("");
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -126,6 +131,26 @@ const std::string &LLVersionInfo::getChannelAndVersion()
|
|||
return sVersionChannel;
|
||||
}
|
||||
|
||||
//<FS:TS> Get version and channel in the format needed for FSDATA.
|
||||
//static
|
||||
const std::string &LLVersionInfo::getChannelAndVersionFS()
|
||||
{
|
||||
if (sVersionChannelFS.empty())
|
||||
{
|
||||
// cache the version string
|
||||
std::ostringstream stream;
|
||||
stream << LL_VIEWER_CHANNEL << " "
|
||||
<< LL_VIEWER_VERSION_MAJOR << "."
|
||||
<< LL_VIEWER_VERSION_MINOR << "."
|
||||
<< LL_VIEWER_VERSION_PATCH << " ("
|
||||
<< LL_VIEWER_VERSION_BUILD << ")";
|
||||
sVersionChannelFS = stream.str();
|
||||
}
|
||||
|
||||
return sVersionChannelFS;
|
||||
}
|
||||
//</FS:TS>
|
||||
|
||||
//static
|
||||
const std::string &LLVersionInfo::getChannel()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ public:
|
|||
/// like "Second Life Release 2.0.0.200030"
|
||||
static const std::string &getChannelAndVersion();
|
||||
|
||||
//<FS:TS> Needed for fsdata version checking
|
||||
/// return the viewer version and hardcoded channel as a string
|
||||
/// like "Firestorm-Release 2.0.0 (200030)"
|
||||
static const std::string &getChannelAndVersionFS();
|
||||
|
||||
/// return the channel name, e.g. "Second Life"
|
||||
static const std::string &getChannel();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue