diff --git a/checkin_notes b/checkin_notes index cc65d4f1b6..f51e5cf847 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2964,7 +2964,11 @@ Rom 22 Mar 2012 vbox.cpp David 22 Mar 2012 - - client/server: + - client/server: add optional to schedule reply. + If set, client won't use DCF for this project. + Make this the default in server code; + we now do runtime estimation entirely on the server side, + and the client-side mechanism is counterproductive. sched/ sched_types.cpp,h @@ -2974,3 +2978,13 @@ David 22 Mar 2012 work_fetch.cpp cs_scheduler.cpp cpu_sched.cpp + +David 23 Mar 2012 + - server: is_project_dir() was checking that cgi-bin is a directory. + This doesn't work if it's a symlink to a dir. + Check for that too. + + lib/ + filesys.cpp,h + sched/ + sched_config.cpp diff --git a/lib/filesys.cpp b/lib/filesys.cpp index 015749d961..3e2548ad52 100644 --- a/lib/filesys.cpp +++ b/lib/filesys.cpp @@ -105,6 +105,12 @@ int is_dir(const char* path) { return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFDIR)); } +int is_dir_follow_symlinks(const char* path) { + struct stat sbuf; + int retval = stat(path, &sbuf); + return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFDIR)); +} + #ifndef _WIN32 int is_symlink(const char* path) { struct stat sbuf; diff --git a/lib/filesys.h b/lib/filesys.h index b5a14cd659..061221b272 100644 --- a/lib/filesys.h +++ b/lib/filesys.h @@ -59,6 +59,7 @@ extern "C" { extern char boinc_failed_file[256]; extern int is_file(const char* path); extern int is_dir(const char* path); + extern int is_dir_follow_symlinks(const char* path); extern int is_symlink(const char* path); extern int boinc_truncate(const char*, double); extern int boinc_file_exists(const char* path); diff --git a/sched/sched_config.cpp b/sched/sched_config.cpp index 8ea03eac44..c8e4675921 100644 --- a/sched/sched_config.cpp +++ b/sched/sched_config.cpp @@ -377,7 +377,7 @@ static bool is_project_dir(const char* dir) { sprintf(buf, "%s/%s", dir, CONFIG_FILE); if (!is_file(buf)) return false; sprintf(buf, "%s/cgi-bin", dir); - if (!is_dir(buf)) return false; + if (!is_dir_follow_symlinks(buf)) return false; return true; }