diff options
author | Andrew A. de Laix <alain@lindenlab.com> | 2010-07-22 17:36:13 -0700 |
---|---|---|
committer | Andrew A. de Laix <alain@lindenlab.com> | 2010-07-22 17:36:13 -0700 |
commit | 7600b0bcd0751d15c855a44cbaad6d94f745869b (patch) | |
tree | 907b282a9b1267df7672b721d34b140d984f4afa /indra/newview/lllogininstance.cpp | |
parent | 35837f2d382120088572ec87006238c79973e493 (diff) |
Fix EXT-8483: switch to LLMachineID::getUniqueID which should always work on windows (no dependency on Netbios).
Diffstat (limited to 'indra/newview/lllogininstance.cpp')
-rw-r--r-- | indra/newview/lllogininstance.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 06f490e8e3..32c358368a 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -58,6 +58,7 @@ #endif #include "llsecapi.h" #include "llstartup.h" +#include "llmachineid.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -165,22 +166,22 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia // (re)initialize the request params with creds. LLSD request_params = user_credential->getLoginParams(); - char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ - LLMD5 hashed_mac; - unsigned char MACAddress[MAC_ADDRESS_BYTES]; - if(LLUUID::getNodeID(MACAddress) == 0) { - llerrs << "Failed to get node id; cannot uniquely identify this machine." << llendl; + char hashed_unique_id_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ + LLMD5 hashed_unique_id; + unsigned char unique_id[MAC_ADDRESS_BYTES]; + if(LLMachineID::getUniqueID(unique_id, sizeof(unique_id)) == 0) { + llerrs << "Failed to get an id; cannot uniquely identify this machine." << llendl; } - hashed_mac.update( MACAddress, MAC_ADDRESS_BYTES ); - hashed_mac.finalize(); - hashed_mac.hex_digest(hashed_mac_string); + hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES); + hashed_unique_id.finalize(); + hashed_unique_id.hex_digest(hashed_unique_id_string); request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; - request_params["mac"] = hashed_mac_string; + request_params["mac"] = hashed_unique_id_string; request_params["version"] = gCurrentVersion; // Includes channel name request_params["channel"] = gSavedSettings.getString("VersionChannelName"); request_params["id0"] = mSerialNumber; |