From 5ac0aee6ce9beb4a65de06bdc27e3b746fd331bc Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 5 Nov 2008 20:27:04 +0000 Subject: [PATCH] - client: add OS name into the hash for host CPID (for multi-OS hosts) - scheduler: use sqrt(x) instead of x in stop-checking for single redundancy. svn path=/trunk/boinc/; revision=16433 --- checkin_notes | 13 +++++++++++++ client/hostinfo_network.cpp | 3 ++- lib/Makefile.am | 2 ++ sched/sched_send.cpp | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 4c38456626..140bbf214f 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9249,3 +9249,16 @@ David 5 Nov 2008 win_build/ boinc_cli_curl.vcproj libboinc.vcproj + +David 5 Nov 2008 + - client: add OS name into the hash for host CPID + (for multi-OS hosts) + - scheduler: use sqrt(x) instead of x in stop-checking + for single redundancy. + + client/ + hostinfo_network.cpp + lib/ + Makefile.am + sched/ + sched_send.cpp diff --git a/client/hostinfo_network.cpp b/client/hostinfo_network.cpp index ac5bdd0fa1..1b600d09d8 100644 --- a/client/hostinfo_network.cpp +++ b/client/hostinfo_network.cpp @@ -97,7 +97,7 @@ void HOST_INFO::generate_host_cpid() { char buffer[8192] = ""; // must be big enough to accommodate aa:bb:cc:dd:ee:ff // times the number of network interfaces, - // plus the domain name, plus the ip addr. + // plus the domain name, IP addr, and OS name. // 8K should suffice if (!get_mac_addresses(buffer) || ! strcmp(buffer, "")) { @@ -106,6 +106,7 @@ void HOST_INFO::generate_host_cpid() { } strcat(buffer, domain_name); strcat(buffer, ip_addr); + strcat(buffer, os_name); md5_block((unsigned char*)buffer, (int)strlen(buffer), host_cpid); #else make_random_string("", host_cpid); diff --git a/lib/Makefile.am b/lib/Makefile.am index 245abf9641..7fccd06db3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -65,6 +65,7 @@ libboinc_a_SOURCES = \ gui_rpc_client_ops.cpp \ gui_rpc_client_print.cpp \ hostinfo.cpp \ + mac_address.cpp \ md5.c \ md5_file.cpp \ mem_usage.cpp \ @@ -94,6 +95,7 @@ pkginclude_HEADERS = \ filesys.h \ gui_rpc_client.h \ hostinfo.h \ + mac_address.h \ mfile.h \ miofile.h \ msg_log.h \ diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index 16789c9066..1377224ff3 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -1362,7 +1362,7 @@ void set_trust(SCHEDULER_REPLY& reply) { } return; } - double x = reply.host.error_rate/ER_MAX; + double x = sqrt(reply.host.error_rate/ER_MAX); if (drand() > x) reply.wreq.trust = true; if (config.debug_send) { log_messages.printf(MSG_DEBUG,