mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=5140
This commit is contained in:
parent
a65c68db19
commit
1f5ef06046
|
@ -22910,3 +22910,15 @@ David 18 Jan 2005
|
|||
|
||||
sched/
|
||||
start
|
||||
|
||||
David 18 Jan 2005
|
||||
- added <min_core_client_version> element to SCHED_CONFIG.
|
||||
Lets the scheduler turn away clients below a certain version
|
||||
without doing a lot of work
|
||||
(especially important for locality scheduling)
|
||||
|
||||
doc/
|
||||
configuration.php
|
||||
sched/
|
||||
sched_config.C,h
|
||||
handle_request.C
|
||||
|
|
|
@ -599,12 +599,13 @@ void send_code_sign_key(
|
|||
}
|
||||
}
|
||||
|
||||
bool wrong_major_version(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
||||
// char buf[256];
|
||||
bool wrong_core_client_version(
|
||||
SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply
|
||||
) {
|
||||
bool wrong_version = false;
|
||||
if (sreq.core_client_major_version != BOINC_MAJOR_VERSION) {
|
||||
//reply.nucleus_only = true;
|
||||
// TODO: check for user-agent not empty and not BOINC
|
||||
reply.probable_user_browser = true;
|
||||
wrong_version = true;
|
||||
sprintf(reply.message,
|
||||
"To participate in this project, "
|
||||
"you must use major version %d of the BOINC core client. "
|
||||
|
@ -612,13 +613,35 @@ bool wrong_major_version(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
|||
BOINC_MAJOR_VERSION,
|
||||
sreq.core_client_major_version
|
||||
);
|
||||
strcpy(reply.message_priority, "low");
|
||||
log_messages.printf(
|
||||
SCHED_MSG_LOG::NORMAL,
|
||||
"[HOST#%d] [auth %s] Wrong major version from user: wanted %d, got %d\n",
|
||||
sreq.hostid, sreq.authenticator,
|
||||
BOINC_MAJOR_VERSION, sreq.core_client_major_version
|
||||
);
|
||||
} else if (config.min_core_client_version) {
|
||||
int major = config.min_core_client_version/100;
|
||||
int minor = config.min_core_client_version % 100;
|
||||
if (sreq.core_client_minor_version < minor) {
|
||||
wrong_version = true;
|
||||
sprintf(reply.message,
|
||||
"To participate in this project, "
|
||||
"you must use version %d.02%d or higher of the BOINC core client. "
|
||||
"Your core client is version %d.02%d.",
|
||||
major, minor,
|
||||
sreq.core_client_major_version, sreq.core_client_minor_version
|
||||
);
|
||||
log_messages.printf(
|
||||
SCHED_MSG_LOG::NORMAL,
|
||||
"[HOST#%d] [auth %s] Wrong minor version from user: wanted %d, got %d\n",
|
||||
sreq.hostid, sreq.authenticator,
|
||||
minor, sreq.core_client_minor_version
|
||||
);
|
||||
}
|
||||
}
|
||||
if (wrong_version) {
|
||||
reply.probable_user_browser = true;
|
||||
strcpy(reply.message_priority, "low");
|
||||
reply.request_delay = 3600*24;
|
||||
return true;
|
||||
}
|
||||
|
@ -708,7 +731,7 @@ void process_request(
|
|||
|
||||
// if different major version of BOINC, just send a message
|
||||
//
|
||||
if (wrong_major_version(sreq, reply)) {
|
||||
if (wrong_core_client_version(sreq, reply)) {
|
||||
ok_to_send_work = false;
|
||||
|
||||
// if no results, return without accessing DB
|
||||
|
|
|
@ -89,6 +89,7 @@ int SCHED_CONFIG::parse(char* buf) {
|
|||
parse_int(buf, "<uldl_dir_fanout>", uldl_dir_fanout);
|
||||
parse_int(buf, "<locality_scheduling_wait_period>", locality_scheduling_wait_period);
|
||||
parse_int(buf, "<locality_scheduling_send_timeout>", locality_scheduling_send_timeout);
|
||||
parse_int(buf, "<min_core_client_version>", min_core_client_version);
|
||||
if (match_tag(buf, "</config>")) {
|
||||
char hostname[256];
|
||||
gethostname(hostname, 256);
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
int uldl_dir_fanout; // fanout of ul/dl dirs; 0 if none
|
||||
int locality_scheduling_wait_period;
|
||||
int locality_scheduling_send_timeout;
|
||||
int min_core_client_version;
|
||||
|
||||
int parse(char*);
|
||||
int parse_file(char* dir=".");
|
||||
|
|
Loading…
Reference in New Issue