allow wront host if same user

svn path=/trunk/boinc/; revision=1431
This commit is contained in:
Karl Chen 2003-06-14 17:46:09 +00:00
parent 47104eaa0e
commit ba5ddea5ae
1 changed files with 20 additions and 6 deletions

View File

@ -504,12 +504,26 @@ int handle_results(
}
if (result.hostid != sreq.hostid) {
log_messages.printf(
SchedMessages::CRITICAL,
"[HOST#%d] [RESULT#%d %s] got result from wrong host; expected [HOST#%d]\n",
host.id, result.id, result.name, result.hostid
);
continue;
log_messages.printf(SchedMessages::CRITICAL,
"[HOST#%d] [RESULT#%d %s] got result from wrong host; expected [HOST#%d]\n",
host.id, result.id, result.name, result.hostid);
DB_HOST result_host;
int retval = result_host.lookup_id(result.hostid);
if (retval) {
log_messages.printf(SchedMessages::CRITICAL, "[RESULT#%d %s] Can't lookup [HOST#%d]\n",
result.id, result.name, result.hostid);
continue;
} else if (result_host.userid != host.userid) {
log_messages.printf(SchedMessages::CRITICAL,
"[USER#%d] [HOST#%d] [RESULT#%d %s] Not even the same user; expected [USER#%d]\n",
host.userid, host.id, result.id, result.name, result_host.userid);
continue;
} else {
log_messages.printf(SchedMessages::CRITICAL,
"[HOST#%d] [RESULT#%d %s] Allowing result because same USER#%d\n",
host.id, result.id, result.name, host.userid);
}
}
result.hostid = reply.host.id;