- 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
This commit is contained in:
David Anderson 2008-11-05 20:27:04 +00:00
parent 5141a6eabe
commit 5ac0aee6ce
4 changed files with 18 additions and 2 deletions

View File

@ -9249,3 +9249,16 @@ David 5 Nov 2008
win_build/ win_build/
boinc_cli_curl.vcproj boinc_cli_curl.vcproj
libboinc.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

View File

@ -97,7 +97,7 @@ void HOST_INFO::generate_host_cpid() {
char buffer[8192] = ""; char buffer[8192] = "";
// must be big enough to accommodate aa:bb:cc:dd:ee:ff // must be big enough to accommodate aa:bb:cc:dd:ee:ff
// times the number of network interfaces, // 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 // 8K should suffice
if (!get_mac_addresses(buffer) || ! strcmp(buffer, "")) { if (!get_mac_addresses(buffer) || ! strcmp(buffer, "")) {
@ -106,6 +106,7 @@ void HOST_INFO::generate_host_cpid() {
} }
strcat(buffer, domain_name); strcat(buffer, domain_name);
strcat(buffer, ip_addr); strcat(buffer, ip_addr);
strcat(buffer, os_name);
md5_block((unsigned char*)buffer, (int)strlen(buffer), host_cpid); md5_block((unsigned char*)buffer, (int)strlen(buffer), host_cpid);
#else #else
make_random_string("", host_cpid); make_random_string("", host_cpid);

View File

@ -65,6 +65,7 @@ libboinc_a_SOURCES = \
gui_rpc_client_ops.cpp \ gui_rpc_client_ops.cpp \
gui_rpc_client_print.cpp \ gui_rpc_client_print.cpp \
hostinfo.cpp \ hostinfo.cpp \
mac_address.cpp \
md5.c \ md5.c \
md5_file.cpp \ md5_file.cpp \
mem_usage.cpp \ mem_usage.cpp \
@ -94,6 +95,7 @@ pkginclude_HEADERS = \
filesys.h \ filesys.h \
gui_rpc_client.h \ gui_rpc_client.h \
hostinfo.h \ hostinfo.h \
mac_address.h \
mfile.h \ mfile.h \
miofile.h \ miofile.h \
msg_log.h \ msg_log.h \

View File

@ -1362,7 +1362,7 @@ void set_trust(SCHEDULER_REPLY& reply) {
} }
return; 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 (drand() > x) reply.wreq.trust = true;
if (config.debug_send) { if (config.debug_send) {
log_messages.printf(MSG_DEBUG, log_messages.printf(MSG_DEBUG,