summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-03-27 13:20:48 -0400
committerOz Linden <oz@lindenlab.com>2013-03-27 13:20:48 -0400
commitc17db85e73a91c145d6eebe36b3b05e2289deae0 (patch)
tree1c534495d9242497715d9f01d43e643b34bb9cb7 /indra/newview
parente68ab0a563061d3d65a3f552a1f5856071bd230e (diff)
add platform and platform version to login request parameters for new version manager query
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp29
-rw-r--r--indra/newview/llappviewer.h2
-rw-r--r--indra/newview/lllogininstance.cpp9
-rw-r--r--indra/newview/lllogininstance.h3
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp4
5 files changed, 35 insertions, 12 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 742c29cc88..47a0cb02e4 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -271,6 +271,19 @@ BOOL gUseQuickTime = TRUE;
eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
+#if LL_WINDOWS
+# define LL_PLATFORM_KEY "win"
+#elif LL_DARWIN
+# define LL_PLATFORM_KEY "mac"
+#elif LL_LINUX
+# define LL_PLATFORM_KEY "lnx"
+#elif LL_SOLARIS
+# define LL_PLATFORM_KEY "sol"
+#else
+# error "Unknown Platform"
+#endif
+const char* gPlatform = LL_PLATFORM_KEY;
+
LLSD gDebugInfo;
U32 gFrameCount = 0;
@@ -669,6 +682,7 @@ LLAppViewer::LLAppViewer() :
gLoggedInTime.stop();
LLLoginInstance::instance().setUpdaterService(mUpdater.get());
+ LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
}
LLAppViewer::~LLAppViewer()
@@ -3014,6 +3028,7 @@ void LLAppViewer::initUpdater()
service_path,
channel,
version,
+ gPlatform,
getOSInfo().getOSVersionString(),
unique_id,
willing_to_test
@@ -5189,17 +5204,9 @@ void LLAppViewer::handleLoginComplete()
void LLAppViewer::launchUpdater()
{
- LLSD query_map = LLSD::emptyMap();
- // *TODO place os string in a global constant
-#if LL_WINDOWS
- query_map["os"] = "win";
-#elif LL_DARWIN
- query_map["os"] = "mac";
-#elif LL_LINUX
- query_map["os"] = "lnx";
-#elif LL_SOLARIS
- query_map["os"] = "sol";
-#endif
+ LLSD query_map = LLSD::emptyMap();
+ query_map["os"] = gPlatform;
+
// *TODO change userserver to be grid on both viewer and sim, since
// userserver no longer exists.
query_map["userserver"] = LLGridManager::getInstance()->getGridId();
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 7563d672e3..69056074e9 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -322,6 +322,8 @@ typedef enum
extern eLastExecEvent gLastExecEvent; // llstartup
+extern const char* gPlatform;
+
extern U32 gFrameCount;
extern U32 gForegroundFrameCount;
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index b27a566c23..a9b7342963 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -488,6 +488,13 @@ LLLoginInstance::LLLoginInstance() :
mDispatcher.add("indeterminate", "", boost::bind(&LLLoginInstance::handleIndeterminate, this, _1));
}
+void LLLoginInstance::setPlatformInfo(const std::string platform,
+ const std::string platform_version)
+{
+ mPlatform = platform;
+ mPlatformVersion = platform_version;
+}
+
LLLoginInstance::~LLLoginInstance()
{
}
@@ -592,6 +599,8 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
request_params["mac"] = (char*)hashed_unique_id_string;
request_params["version"] = LLVersionInfo::getChannelAndVersion(); // Includes channel name
request_params["channel"] = LLVersionInfo::getChannel();
+ request_params["platform"] = mPlatform;
+ request_params["platform_version"] = mPlatformVersion;
request_params["id0"] = mSerialNumber;
request_params["host_id"] = gSavedSettings.getString("HostID");
request_params["extended_errors"] = true; // request message_id and message_args
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 8b53431219..83191e50bd 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -66,6 +66,7 @@ public:
void setSkipOptionalUpdate(bool state) { mSkipOptionalUpdate = state; }
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
+ void setPlatformInfo(const std::string platform, const std::string platform_version);
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
@@ -99,6 +100,8 @@ private:
F64 mTransferRate;
std::string mSerialNumber;
int mLastExecEvent;
+ std::string mPlatform;
+ std::string mPlatformVersion;
UpdaterLauncherCallback mUpdaterLauncher;
LLEventDispatcher mDispatcher;
LLUpdaterService * mUpdaterService;
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index a86230488b..faf46f0984 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -73,7 +73,7 @@ void LLViewerWindow::setShowProgress(BOOL show) {}
LLProgressView * LLViewerWindow::getProgressView(void) const { return 0; }
LLViewerWindow* gViewerWindow;
-
+
class LLLogin::Impl
{
};
@@ -212,6 +212,7 @@ void LLUpdaterService::initialize(const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version,
+ const std::string& platform,
const std::string& platform_version,
const unsigned char uniqueid[MD5HEX_STR_SIZE],
const bool& willing_to_test
@@ -369,6 +370,7 @@ namespace tut
accountCredential->setCredentialData(identifier, authenticator);
logininstance->setNotificationsInterface(&notifications);
+ logininstance->setPlatformInfo("win", "1.3.5");
}
LLLoginInstance* logininstance;