From 2c38c3e9a83435db25718971b333e610a58e0f76 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 20 Apr 2005 06:16:54 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5900 --- checkin_notes | 8 ++++++++ client/app.C | 18 ++++++++++++++++++ client/app.h | 1 + client/client_state.C | 2 ++ client/cs_apps.C | 3 +-- 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index db3bd701fb..e34be1d32d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -27419,3 +27419,11 @@ David 19 April 2005 app.C cs_cmdline.C gui_rpc_server.C + +David 19 April 2005 + - core client: warn user if results are overdue + + client/ + app.C,h + client_state.C + cs_apps.C diff --git a/client/app.C b/client/app.C index 1cf649528e..ee1ca1eed8 100644 --- a/client/app.C +++ b/client/app.C @@ -492,4 +492,22 @@ void MSG_QUEUE::msg_queue_poll(MSG_CHANNEL& channel) { } } +void ACTIVE_TASK_SET::report_overdue(double now) { + unsigned int i; + ACTIVE_TASK* atp; + + for (i=0; iresult->report_deadline)/86400; + if (diff > 0) { + msg_printf(atp->result->project, MSG_ERROR, + "Result %s is %.2f days overdue.", atp->result->name, diff + ); + msg_printf(atp->result->project, MSG_ERROR, + "You may not get credit for it. Consider aborting it." + ); + } + } +} + const char *BOINC_RCSID_778b61195e = "$Id$"; diff --git a/client/app.h b/client/app.h index df9fcc5a9a..2b73dcb586 100644 --- a/client/app.h +++ b/client/app.h @@ -204,6 +204,7 @@ public: int get_free_slot(); void send_heartbeats(); void send_trickle_downs(); + void report_overdue(double); // screensaver-related functions ACTIVE_TASK* get_ss_app(); diff --git a/client/client_state.C b/client/client_state.C index 33962f8598..446ea88b2e 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -329,6 +329,8 @@ int CLIENT_STATE::init() { retval = make_project_dirs(); if (retval) return retval; + active_tasks.report_overdue(dtime()); + // Just to be on the safe side; something may have been modified // set_client_state_dirty("init"); diff --git a/client/cs_apps.C b/client/cs_apps.C index 7bbfaf8519..504c36722a 100644 --- a/client/cs_apps.C +++ b/client/cs_apps.C @@ -658,8 +658,7 @@ int CLIENT_STATE::choose_version_num(char* app_name, SCHEDULER_REPLY& sr) { return best; } -// goes through results and checks if the associated apps has no app files -// then there is nothing to do, never start the app, close the result +// handle file-transfer applications // void CLIENT_STATE::handle_file_xfer_apps() { unsigned int i;