From 90740c7690cd58c538417de552dd9642e701bf68 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 17 Dec 2008 21:58:54 +0000 Subject: [PATCH] - feeder: include all app versions that have maximal version num within their plan class svn path=/trunk/boinc/; revision=16714 --- checkin_notes | 7 +++++++ sched/sched_shmem.cpp | 39 ++++++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/checkin_notes b/checkin_notes index 4f059e3d33..dcc755018d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -10224,3 +10224,10 @@ Rom 17 Dec 2008 / configure.ac version.h + +David 17 Dec 2008 + - feeder: include all app versions that have maximal version num + within their plan class + + sched/ + sched_shmem.cpp diff --git a/sched/sched_shmem.cpp b/sched/sched_shmem.cpp index ee7307dc84..610ebdd2cf 100644 --- a/sched/sched_shmem.cpp +++ b/sched/sched_shmem.cpp @@ -115,33 +115,38 @@ int SCHED_SHMEM::scan_tables() { n = 0; // for each (app, platform) pair, - // find the greatest version num of a non-deprecated version - // greater than app.min_version, if any. - // Then get all versions with that number. + // get all versions with numbers maximal in their plan class. // for (i=0; i avs; + char query[1024]; sprintf(query, - "select max(version_num) from app_version where appid=%d and platformid=%d and version_num>=%d and deprecated=0", - sapp.id, splatform.id, sapp.min_version + "where appid=%d and platformid=%d and deprecated=0", + sapp.id, splatform.id, max_version ); - retval = app_version.get_integer(query, max_version); - if (!retval) { - sprintf(query, - "where appid=%d and platformid=%d and version_num=%d and deprecated=0", - sapp.id, splatform.id, max_version - ); - while (!app_version.enumerate(query)) { - app_versions[n++] = app_version; - if (n == MAX_APP_VERSIONS) { - overflow("app_versions", "MAX_APP_VERSIONS"); + while (!app_version.enumerate(query)) { + avs.push_back(app_version); + } + for (unsigned int k=0; k av2.version_num) { + av2.deprecated = 1; } } } + for (unsigned int k=0; k