From f29caba04913871cbf82f0f8bdc40dcc8a9a0967 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 1 Jun 2004 22:19:24 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3490 --- checkin_notes | 12 ++++++++++++ client/scheduler_op.C | 5 ++++- lib/filesys.C | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 59ce66ea95..b63e4c96ce 100755 --- a/checkin_notes +++ b/checkin_notes @@ -12942,3 +12942,15 @@ David June 1 2004 forum_thread.php py/Boinc/ setup_project.py + +David June 1 2004 + - client: SCHEDULER_OP::poll(): if a RPC or master fetch fails for + a tentative project, set the RPC state to IDLE + before calling project_add_failed(). + Otherwise that function will attempt to remove the + NET_XFER and HTTP_OP, which have alread been removed + - client: clean_out_dir(): return 0 if directory doesn't exist + client/ + scheduler_op.C + lib/ + filesys.C diff --git a/client/scheduler_op.C b/client/scheduler_op.C index d7b49a2aa6..4a9be27afe 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -92,7 +92,7 @@ int SCHEDULER_OP::init_get_work() { project = gstate.next_project(0); if (project) { msg_printf(project, MSG_INFO, - "Requesting %f seconds of work", ns + "Requesting %.0f seconds of work", ns ); retval = init_op_project(ns); if (retval) { @@ -367,6 +367,7 @@ bool SCHEDULER_OP::poll() { if (project->tentative) { PROJECT* project_temp = project; project = 0; // keep detach(0) from removing HTTP OP + state = SCHEDULER_OP_STATE_IDLE; // avoid double remove project_add_failed(project_temp); err = true; } else { @@ -397,6 +398,7 @@ bool SCHEDULER_OP::poll() { // if (!err && project->scheduler_urls.size() == 0) { if (project->tentative) { + state = SCHEDULER_OP_STATE_IDLE; // avoid double remove project_add_failed(project); } else { sprintf(err_msg, @@ -468,6 +470,7 @@ bool SCHEDULER_OP::poll() { // if (project->tentative) { if (retval || strlen(project->user_name)==0) { + state = SCHEDULER_OP_STATE_IDLE; // avoid double remove project_add_failed(project); } else { project->tentative = false; diff --git a/lib/filesys.C b/lib/filesys.C index 328548a2f0..8c6898cf4f 100755 --- a/lib/filesys.C +++ b/lib/filesys.C @@ -290,7 +290,7 @@ int clean_out_dir(const char* dirpath) { DIRREF dirp; dirp = dir_open(dirpath); - if (!dirp) return ERR_OPENDIR; + if (!dirp) return 0; // if dir doesn't exist, it's empty while (1) { strcpy(filename, ""); retval = dir_scan(filename, dirp, sizeof(filename));