In retransmitting lost work, do NOT set the send_time and the deadline to new

values.  Else the result will never time out!  (David, would it be OK to
simply modify the send_time but NOT the deadline?  This would make it easy
to see in the database that the result is being resent.)

svn path=/trunk/boinc/; revision=6868
This commit is contained in:
Bruce Allen 2005-07-28 22:21:46 +00:00
parent 3282d6125d
commit bedb30b032
1 changed files with 14 additions and 3 deletions

View File

@ -647,11 +647,22 @@ int add_result_to_reply(
// update the result in DB
//
result.server_state = RESULT_SERVER_STATE_IN_PROGRESS;
// If the result has already been sent and is being re-sent
// don't update the sent time and deadline
//
result.hostid = reply.host.id;
result.userid = reply.user.id;
result.sent_time = time(0);
result.report_deadline = result.sent_time + wu.delay_bound;
if (result.server_state != RESULT_SERVER_STATE_IN_PROGRESS) {
result.sent_time = time(0);
result.report_deadline = result.sent_time + wu.delay_bound;
result.server_state = RESULT_SERVER_STATE_IN_PROGRESS;
} else {
log_messages.printf(
SCHED_MSG_LOG::DEBUG,
"[RESULT#%d] [HOST#%d] NO update to sent_time/report_deadline (resend lost work)\n",
result.id, reply.host.id
);
}
retval = result.update_subset();
if (retval) {
log_messages.printf(