summaryrefslogtreecommitdiff
path: root/indra/newview/llmachineid.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-12-04 23:26:46 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-12-05 02:20:26 +0200
commit9432e092d340f3ac988cdfde182b21302ed47e91 (patch)
tree97f795dd1369f454a53431957ab23816ac4c419d /indra/newview/llmachineid.cpp
parent970345e6eaf4bd9f0e3ce2189695fab6b9c8db06 (diff)
SL-2363 Use only product uuid and fallback to product serial
Diffstat (limited to 'indra/newview/llmachineid.cpp')
-rw-r--r--indra/newview/llmachineid.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index d48aadfe74..cfcf085876 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -368,41 +368,11 @@ S32 LLMachineID::init()
has_static_legacy_id = true;
}
- // Try motherboard/bios id, if it is present it is supposed to be sufficiently
- // unique (it's used for Win8 activation)
+ // Try motherboard/bios id, if it is present it is supposed to be sufficiently unique
if (comInit.getComputerSystemProductUUID(static_unique_id, len))
{
has_static_unique_id = true;
- LL_DEBUGS("AppInit") << "Using product uuid as serial" << LL_ENDL;
- }
-
- // Try HDD and CPU ids
- if (!has_static_unique_id)
- {
- unsigned char hdd_id[] = { 0,0,0,0,0,0 };
- unsigned char cpu_id[] = { 0,0,0,0,0,0 };
- unsigned char mbrd_id[] = { 0,0,0,0,0,0 };
-
- if (comInit.getDiskDriveSerialNumber(hdd_id, len)
- && comInit.getProcessorSerialNumber(cpu_id, len)
- && comInit.getMotherboardSerialNumber(mbrd_id, len))
- {
- // Combine HDD, CPU and motherboard ids
- // By themself they are not sufficiently unique and often contain model
- // instead of unique number, but should be good enough when combined
- // Todo: if not sufficiently unique, add hdd's partition id
- S32 summ = 0;
- for (S32 i = 0; i < len; i++)
- {
- static_unique_id[i] = hdd_id[i] + cpu_id[i] + mbrd_id[i];
- summ += static_unique_id[i];
- }
- if (summ > 0)
- {
- has_static_unique_id = true;
- LL_DEBUGS("AppInit") << "Using hdd and cpu ids as serial" << LL_ENDL;
- }
- }
+ LL_DEBUGS("AppInit") << "Using product uuid as unique id" << LL_ENDL;
}
// Fallback to legacy