diff --git a/checkin_notes b/checkin_notes index 0a82d81a87..c98767f458 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6586,3 +6586,12 @@ David 22 June 2007 lib/ parse.C prefs.C + +David 22 June 2007 + - client: read only first 63KB of stderr.txt + - user web: default work_buf_min_days is 0, not "" + + html/inc/ + prefs.inc + client/ + app_control.C diff --git a/client/app_control.C b/client/app_control.C index 772d17ef66..561338c575 100644 --- a/client/app_control.C +++ b/client/app_control.C @@ -565,22 +565,19 @@ bool ACTIVE_TASK::read_stderr_file() { std::string stderr_file; char path[256]; + // truncate stderr output to 63KB; + // it's unlikely that more than that will be useful + // + int max_len = 63*1024; + sprintf(path, "%s/%s", slot_dir, STDERR_FILE); - if (boinc_file_exists(path) && !read_file_string(path, stderr_file)) { - // truncate stderr output to 63KB; - // it's unlikely that more than that will be useful - // - int max_len = 63*1024; - int len = (int)stderr_file.length(); - if (len > max_len) { - stderr_file = stderr_file.substr(len-max_len, len); - } - result->stderr_out += "\n"; - result->stderr_out += stderr_file; - result->stderr_out += "\n\n"; - return true; - } - return false; + if (!boinc_file_exists(path)) return false; + if (read_file_string(path, stderr_file, max_len)) return false; + + result->stderr_out += "\n"; + result->stderr_out += stderr_file; + result->stderr_out += "\n\n"; + return true; } // tell a running app to reread project preferences. diff --git a/doc/index.php b/doc/index.php index 36aee1a272..9cd4116fd1 100644 --- a/doc/index.php +++ b/doc/index.php @@ -110,7 +110,7 @@ function show_other() {