From 0129c1c53de5dd844e0c0afd80c0c0f655e46fa4 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 11 Aug 2012 04:20:48 +0000 Subject: [PATCH] - server: fix bug in restrict_wu_to_user() that caused it to go into infinite loop svn path=/trunk/boinc/; revision=26006 --- checkin_notes | 7 +++++++ sched/sched_util.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 41cab444db..a0f5b8178c 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5418,3 +5418,10 @@ David 10 Aug 2012 api/ boinc_api.cpp,h + +David 10 Aug 2012 + - server: fix bug in restrict_wu_to_user() that caused it + to go into infinite loop + + sched/ + sched_util.cpp diff --git a/sched/sched_util.cpp b/sched/sched_util.cpp index ac31b85694..7c1d45ec96 100644 --- a/sched/sched_util.cpp +++ b/sched/sched_util.cpp @@ -330,7 +330,7 @@ int restrict_wu_to_user(WORKUNIT& _wu, int userid) { sprintf(buf, "where workunitid=%d and server_state=%d", wu.id, RESULT_SERVER_STATE_UNSENT ); - while (result.enumerate(buf)) { + while (!result.enumerate(buf)) { char buf2[256]; sprintf(buf2, "server_state=%d, outcome=%d", RESULT_SERVER_STATE_OVER,