From 3dfea63937000055a5bbd1753c026b9c1b7a7c84 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 28 Jul 2005 08:09:46 +0000 Subject: [PATCH] scheduler fix svn path=/trunk/boinc/; revision=6860 --- checkin_notes | 15 +++++++++++++++ db/boinc_db.C | 1 + doc/boinc_news.inc | 2 +- doc/bugs.php | 6 +----- sched/handle_request.C | 4 +++- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index 0c2659fd63..95798ba9bd 100755 --- a/checkin_notes +++ b/checkin_notes @@ -9617,3 +9617,18 @@ David 27 July 2005 client/ hostinfo_unix.C + +David 27 July 2005 + - fix fairly minor scheduler bug, + in the case where a reported result was not found in the DB, + which caused scheduler reply messages to contain some garbage + + In DB_SCHED_RESULT_ITEM_SET::add_result(), + zero the id of the item added. + That way, if it wasn't found in the database, + it won't be updated or acknowledged + + db/ + boinc_db.C + sched/ + handle_request.C diff --git a/db/boinc_db.C b/db/boinc_db.C index d2daa0ab86..a5f39ffd4f 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -1280,6 +1280,7 @@ void SCHED_RESULT_ITEM::parse(MYSQL_ROW& r) { int DB_SCHED_RESULT_ITEM_SET::add_result(char* result_name) { SCHED_RESULT_ITEM result; + result.id = 0; strcpy2(result.queried_name, result_name); results.push_back(result); return 0; diff --git a/doc/boinc_news.inc b/doc/boinc_news.inc index 71fc692673..7fcd104871 100644 --- a/doc/boinc_news.inc +++ b/doc/boinc_news.inc @@ -6,7 +6,7 @@ array("July 25, 2005", "A group of students from Cornell have written Distributing Science, a very nice article about BOINC - and some of the projects using it." + and some of the projects using it." ), array("July 24, 2005", "A paper by Jakob Pedersen & Christian Søttrup diff --git a/doc/bugs.php b/doc/bugs.php index eb36e0b67c..b82b4e279a 100644 --- a/doc/bugs.php +++ b/doc/bugs.php @@ -18,7 +18,7 @@ Your bug may have already been fixed. (which is readable and writeable). "; -if (0) { +if (1) { echo "
  • Read BOINC's internal bug database. @@ -27,8 +27,4 @@ and is readable by the rest of the world. "; } -echo " -

    - -"; ?> diff --git a/sched/handle_request.C b/sched/handle_request.C index d93714a045..8a305fb117 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -484,7 +484,8 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { if (sreq.results.size() == 0) return 0; - // copy names of reported results to a separate vector + // copy reported results to a separate vector, "result_handler", + // initially with only the "name" field present // for (i=0; iname ); + reply.result_acks.push_back(std::string(rp->name)); continue; }