From a52bce39d41af360104198e1c2ee558c7bbe2e38 Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Thu, 11 Sep 2003 09:35:19 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2323 --- checkin_notes | 2 ++ sched/transitioner.C | 40 +++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/checkin_notes b/checkin_notes index 9872dfed89..a0039ebe16 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6251,6 +6251,8 @@ Karl 2003/09/07 Karl 2003/09/10 - fixed transitioner bug where canonical result output files got deleted. + - changed all forms of "DB_RESULT result = results[I]" to "DB_RESULTS& + result = results[I]" Sched/ transitioner.C diff --git a/sched/transitioner.C b/sched/transitioner.C index fdb06dd5f8..9533210f73 100644 --- a/sched/transitioner.C +++ b/sched/transitioner.C @@ -48,21 +48,24 @@ SCHED_CONFIG config; R_RSA_PRIVATE_KEY key; void handle_wu(DB_WORKUNIT& wu) { - vector results; - DB_RESULT result; - DB_RESULT canonical_result; + vector results; + DB_RESULT* p_canonical_result = NULL; int nerrors, retval, ninprogress, nsuccess; int nunsent, ncouldnt_send, nover; unsigned int i, n; - char buf[256], suffix[256], result_template[MAX_BLOB_SIZE]; + char suffix[256], result_template[MAX_BLOB_SIZE]; time_t now = time(0), x; bool all_over, have_result_to_validate, do_delete; - // scan the results for the WU - // - sprintf(buf, "where workunitid=%d", wu.id); - while (!result.enumerate(buf)) { - results.push_back(result); + { + char buf[256]; + // scan the results for the WU + // + DB_RESULT result; + sprintf(buf, "where workunitid=%d", wu.id); + while (!result.enumerate(buf)) { + results.push_back(result); + } } log_messages.printf( @@ -81,7 +84,7 @@ void handle_wu(DB_WORKUNIT& wu) { ncouldnt_send = 0; have_result_to_validate = false; for (i=0; i