MAINT-7594: add platform name string to login request (and add request parameter logging at DEBUG)
parent
f1e52656e9
commit
6980f5bcc2
|
|
@ -734,7 +734,7 @@ LLAppViewer::LLAppViewer()
|
|||
//
|
||||
|
||||
LLLoginInstance::instance().setUpdaterService(mUpdater.get());
|
||||
LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
|
||||
LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString(), getOSInfo().getOSStringSimple());
|
||||
}
|
||||
|
||||
LLAppViewer::~LLAppViewer()
|
||||
|
|
|
|||
|
|
@ -493,10 +493,12 @@ LLLoginInstance::LLLoginInstance() :
|
|||
}
|
||||
|
||||
void LLLoginInstance::setPlatformInfo(const std::string platform,
|
||||
const std::string platform_version)
|
||||
const std::string platform_version,
|
||||
const std::string platform_name)
|
||||
{
|
||||
mPlatform = platform;
|
||||
mPlatformVersion = platform_version;
|
||||
mPlatformVersionName = platform_name;
|
||||
}
|
||||
|
||||
LLLoginInstance::~LLLoginInstance()
|
||||
|
|
@ -565,7 +567,6 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
requested_options.append("event_notifications");
|
||||
requested_options.append("classified_categories");
|
||||
requested_options.append("adult_compliant");
|
||||
//requested_options.append("inventory-targets");
|
||||
requested_options.append("buddy-list");
|
||||
requested_options.append("newuser-config");
|
||||
requested_options.append("ui-config");
|
||||
|
|
@ -587,8 +588,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
requested_options.append("god-connect");
|
||||
}
|
||||
|
||||
// (re)initialize the request params with creds.
|
||||
LLSD request_params = user_credential->getLoginParams();
|
||||
LLSD request_params;
|
||||
|
||||
unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
|
||||
if ( ! llHashedUniqueID(hashed_unique_id_string) )
|
||||
|
|
@ -606,10 +606,24 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
request_params["channel"] = LLVersionInfo::getChannel();
|
||||
request_params["platform"] = mPlatform;
|
||||
request_params["platform_version"] = mPlatformVersion;
|
||||
request_params["platform_string"] = mPlatformVersionName;
|
||||
request_params["id0"] = mSerialNumber;
|
||||
request_params["host_id"] = gSavedSettings.getString("HostID");
|
||||
request_params["extended_errors"] = true; // request message_id and message_args
|
||||
|
||||
// log request_params _before_ adding the credentials
|
||||
LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer<LLSDNotationFormatter>(request_params) << LL_ENDL;
|
||||
|
||||
// Copy the credentials into the request after logging the rest
|
||||
LLSD credentials(user_credential->getLoginParams());
|
||||
for (LLSD::map_const_iterator it = credentials.beginMap();
|
||||
it != credentials.endMap();
|
||||
it++
|
||||
)
|
||||
{
|
||||
request_params[it->first] = it->second;
|
||||
}
|
||||
|
||||
mRequestData.clear();
|
||||
mRequestData["method"] = "login_to_simulator";
|
||||
mRequestData["params"] = request_params;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public:
|
|||
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
|
||||
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
|
||||
void setLastExecDuration(S32 duration) { mLastExecDuration = duration; }
|
||||
void setPlatformInfo(const std::string platform, const std::string platform_version);
|
||||
void setPlatformInfo(const std::string platform, const std::string platform_version, const std::string platform_name);
|
||||
|
||||
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
|
||||
LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; }
|
||||
|
|
@ -105,6 +105,7 @@ private:
|
|||
S32 mLastExecDuration;
|
||||
std::string mPlatform;
|
||||
std::string mPlatformVersion;
|
||||
std::string mPlatformVersionName;
|
||||
UpdaterLauncherCallback mUpdaterLauncher;
|
||||
LLEventDispatcher mDispatcher;
|
||||
LLUpdaterService * mUpdaterService;
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ namespace tut
|
|||
accountCredential->setCredentialData(identifier, authenticator);
|
||||
|
||||
logininstance->setNotificationsInterface(¬ifications);
|
||||
logininstance->setPlatformInfo("win", "1.3.5");
|
||||
logininstance->setPlatformInfo("win", "1.3.5", "Windows Bogus Version 100.6.6.6");
|
||||
}
|
||||
|
||||
LLLoginInstance* logininstance;
|
||||
|
|
@ -478,109 +478,4 @@ namespace tut
|
|||
ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false);
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<3>()
|
||||
{
|
||||
set_test_name("Test Mandatory Update User Accepts");
|
||||
|
||||
// Part 1 - Mandatory Update, with User accepts response.
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "update";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
|
||||
notifications.sendYesResponse();
|
||||
|
||||
ensure("Disconnected", !(logininstance->authSuccess()));
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<4>()
|
||||
{
|
||||
set_test_name("Test Mandatory Update User Decline");
|
||||
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "update";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
notifications.sendNoResponse();
|
||||
|
||||
ensure("Disconnected", !(logininstance->authSuccess()));
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<6>()
|
||||
{
|
||||
set_test_name("Test Optional Update User Accept");
|
||||
|
||||
// Part 3 - Mandatory Update, with bogus response.
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "optional";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
notifications.sendYesResponse();
|
||||
|
||||
ensure("Disconnected", !(logininstance->authSuccess()));
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<7>()
|
||||
{
|
||||
set_test_name("Test Optional Update User Denies");
|
||||
|
||||
// Part 3 - Mandatory Update, with bogus response.
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "optional";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
notifications.sendNoResponse();
|
||||
|
||||
// User skips, should be reconnecting.
|
||||
ensure_equals("reconnect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
ensure_equals("skipping optional update", gLoginCreds["params"]["skipoptional"].asBoolean(), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue