From 8e55a2dd0f2ecdfc3ba0c27061d01626eafe2e67 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 9 Jan 2005 22:23:53 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5046 --- sched/sched_locality.C | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sched/sched_locality.C b/sched/sched_locality.C index 9d048b153d..34fed37b07 100644 --- a/sched/sched_locality.C +++ b/sched/sched_locality.C @@ -247,7 +247,7 @@ static void send_new_file_work( SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply, PLATFORM& platform, WORK_REQ& wreq, SCHED_SHMEM& ss ) { - int retval, lastid=0, nsent, last_wuid=0, i; + int lookup_retval, retval, lastid=0, nsent, last_wuid=0, i; DB_RESULT result; char filename[256]; char buf[256]; @@ -259,26 +259,24 @@ static void send_new_file_work( "where server_state=%d and workunitid<>%d limit 1", RESULT_SERVER_STATE_UNSENT, last_wuid ); - retval = result.lookup(buf); + lookup_retval = result.lookup(buf); // if we see the same result twice, bail (avoid spinning) // - if (!retval && (result.id == lastid)) retval = -1; + if (!lookup_retval && (result.id == lastid)) retval = -1; - if (!retval) { + if (!lookup_retval) { lastid = result.id; retval = possibly_send_result( result, sreq, reply, platform, wreq, ss ); - if (!retval) { - if (config.one_result_per_user_per_wu) { - last_wuid = result.workunitid; - } + if (config.one_result_per_user_per_wu) { + last_wuid = result.workunitid; } } boinc_db.commit_transaction(); - if (retval) break; + if (lookup_retval) break; // try to send more result w/ same file //