From bedb30b0321d13fb594384b964dbb86bdb06b620 Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Thu, 28 Jul 2005 22:21:46 +0000 Subject: [PATCH] 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 --- sched/sched_send.C | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sched/sched_send.C b/sched/sched_send.C index 6ac14c2cdd..b25e3e0646 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -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(