From 2e16ede95c6f247732eb7232c180d5aa9dda0246 Mon Sep 17 00:00:00 2001 From: Michael Gary Date: Thu, 8 Aug 2002 23:41:48 +0000 Subject: [PATCH] Fixed bug in dosomething fsm svn path=/trunk/boinc/; revision=277 --- client/app.C | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/app.C b/client/app.C index 394f1f3ff3..7b380566f4 100644 --- a/client/app.C +++ b/client/app.C @@ -23,6 +23,7 @@ #include "windows_cpp.h" #include "error_numbers.h" +#include "filesys.h" #ifdef _WIN32 #include @@ -605,6 +606,7 @@ bool ACTIVE_TASK::check_app_status_files() { FILE* f; char app_path[256]; bool found = false; + int retval; sprintf(app_path, "%s/%s", dirname, CHECKPOINT_CPU_FILE); f = fopen(app_path, "r"); @@ -612,6 +614,10 @@ bool ACTIVE_TASK::check_app_status_files() { found = true; parse_checkpoint_cpu_file(f, checkpoint_cpu_time); fclose(f); + retval = file_delete(CHECKPOINT_CPU_FILE); + if (retval) { + fprintf(stderr, "error: ACTIVE_TASK.check_app_status_files: could not delete file %s\n", CHECKPOINT_CPU_FILE); + } } sprintf(app_path, "%s/%s", dirname, FRACTION_DONE_FILE); @@ -622,6 +628,10 @@ bool ACTIVE_TASK::check_app_status_files() { f, current_cpu_time, fraction_done ); fclose(f); + retval = file_delete(app_path); + if (retval) { + fprintf(stderr, "error: ACTIVE_TASK.check_app_status_files: could not delete file %s\n", FRACTION_DONE_FILE); + } } return found; } @@ -631,7 +641,7 @@ bool ACTIVE_TASK::check_app_status_files() { bool ACTIVE_TASK_SET::poll_time() { ACTIVE_TASK* atp; unsigned int i; - bool updated; + bool updated = false; for(i=0; i