mirror of https://github.com/BOINC/boinc.git
client: fix bug that caused host CPID to change on each startup
This commit is contained in:
parent
abfd522840
commit
3bcf2a3530
|
@ -74,7 +74,7 @@ void HOST_INFO::clear_host_info() {
|
|||
have_cpu_opencl = false;
|
||||
}
|
||||
|
||||
int HOST_INFO::parse(XML_PARSER& xp, bool benchmarks_only) {
|
||||
int HOST_INFO::parse(XML_PARSER& xp, bool static_items_only) {
|
||||
while (!xp.get_tag()) {
|
||||
if (xp.match_tag("/host_info")) return 0;
|
||||
if (xp.parse_double("p_fpops", p_fpops)) {
|
||||
|
@ -93,18 +93,19 @@ int HOST_INFO::parse(XML_PARSER& xp, bool benchmarks_only) {
|
|||
}
|
||||
if (xp.parse_double("p_calculated", p_calculated)) continue;
|
||||
if (xp.parse_bool("p_vm_extensions_disabled", p_vm_extensions_disabled)) continue;
|
||||
if (xp.parse_str("host_cpid", host_cpid, sizeof(host_cpid))) continue;
|
||||
#ifdef ANDROID
|
||||
if (xp.parse_str("product_name", product_name, sizeof(product_name))) continue;
|
||||
#endif
|
||||
|
||||
if (benchmarks_only) continue;
|
||||
if (static_items_only) continue;
|
||||
|
||||
// WARNING: NOTHING AFTER HERE IS READ FROM STATE FILE ON THE CLIENT
|
||||
// Items after here are determined dynamically at startup,
|
||||
// so don't parse them from the state file
|
||||
|
||||
if (xp.parse_int("timezone", timezone)) continue;
|
||||
if (xp.parse_str("domain_name", domain_name, sizeof(domain_name))) continue;
|
||||
if (xp.parse_str("ip_addr", ip_addr, sizeof(ip_addr))) continue;
|
||||
if (xp.parse_str("host_cpid", host_cpid, sizeof(host_cpid))) continue;
|
||||
if (xp.parse_int("p_ncpus", p_ncpus)) continue;
|
||||
if (xp.parse_str("p_vendor", p_vendor, sizeof(p_vendor))) continue;
|
||||
if (xp.parse_str("p_model", p_model, sizeof(p_model))) continue;
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
OPENCL_DEVICE_PROP cpu_opencl_prop;
|
||||
|
||||
HOST_INFO();
|
||||
int parse(XML_PARSER&, bool benchmarks_only = false);
|
||||
int parse(XML_PARSER&, bool static_items_only = false);
|
||||
int write(MIOFILE&, bool include_net_info, bool include_coprocs);
|
||||
int parse_cpu_benchmarks(FILE*);
|
||||
int write_cpu_benchmarks(FILE*);
|
||||
|
|
Loading…
Reference in New Issue