From f22f27cb7b5ee9eded2ebe95c574ea785942e3f5 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 14 Jun 2003 20:03:08 +0000 Subject: [PATCH] various svn path=/trunk/boinc/; revision=1433 --- sched/validate_test.C | 6 ++++-- sched/wd_nresults_changing.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sched/validate_test.C b/sched/validate_test.C index 8b8e2dcdde..7a82c95ff8 100644 --- a/sched/validate_test.C +++ b/sched/validate_test.C @@ -23,6 +23,7 @@ using namespace std; #include "boinc_db.h" #include "config.h" #include "parse.h" +#include "sched_util.h" extern CONFIG config; @@ -44,7 +45,7 @@ int get_output_file_path(RESULT& result, char* path) { int check_set(vector& results, int& canonicalid, double& credit) { int i, j, n, neq=0, retval, ilow, ihigh, canonical; char* files[100]; - char path[256]; + char path[256], buf[256]; bool found; double c, low=0.0, high=0.0; @@ -65,7 +66,8 @@ int check_set(vector& results, int& canonicalid, double& credit) { } retval = read_file_malloc(path, files[i]); if (retval) { - fprintf(stderr, "read_file_malloc %s %d\n", path, retval); + sprintf(buf, "read_file_malloc %s %d\n", path, retval); + write_log(buf, MSG_CRITICAL); return retval; } } diff --git a/sched/wd_nresults_changing.php b/sched/wd_nresults_changing.php index c74fb0347b..660a102ac9 100755 --- a/sched/wd_nresults_changing.php +++ b/sched/wd_nresults_changing.php @@ -28,7 +28,7 @@ function read_count_file() { function write_count_file($n,$m) { $f = fopen("nresults", "w"); if (!$f) return false; - $x = sprintf("%d\n%d", $n, $m); + $x = sprintf("%d\n%d\n", $n, $m); fwrite($f, $x); fclose($f); return true;