*** empty log message ***

svn path=/trunk/boinc/; revision=10878
This commit is contained in:
David Anderson 2006-08-10 17:36:28 +00:00
parent a95a39f66d
commit c7fe57ad41
4 changed files with 18 additions and 11 deletions

View File

@ -8602,10 +8602,20 @@ David 9 Aug 2006
html/inc/
util.inc
David 9 Aug 2006
David 10 Aug 2006
- add certificate authority bundle file to linux release
client/
cpu_sched.C
sea/
Makefile.am
David 10 Aug 2006
- core client: choose_version_num(): fix bug that could happen
if two projects have app with same name
(from Josef Segur)
client/
client_state.h
cs_apps.C
cs_scheduler.C

View File

@ -317,7 +317,7 @@ public:
private:
int nslots;
int choose_version_num(char*, SCHEDULER_REPLY&);
int choose_version_num(WORKUNIT*, SCHEDULER_REPLY&);
int app_finished(ACTIVE_TASK&);
bool start_apps();
bool handle_finished_apps();

View File

@ -325,7 +325,7 @@ double CLIENT_STATE::get_fraction_done(RESULT* result) {
// Decide which app version to use for a WU.
// Return -1 if can't find one
//
int CLIENT_STATE::choose_version_num(char* app_name, SCHEDULER_REPLY& sr) {
int CLIENT_STATE::choose_version_num(WORKUNIT* wup, SCHEDULER_REPLY& sr) {
unsigned int i;
int best = -1;
APP_VERSION* avp;
@ -334,7 +334,7 @@ int CLIENT_STATE::choose_version_num(char* app_name, SCHEDULER_REPLY& sr) {
//
for (i=0; i<sr.app_versions.size(); i++) {
avp = &sr.app_versions[i];
if (!strcmp(app_name, avp->app_name)) {
if (!strcmp(wup->app_name, avp->app_name)) {
return avp->version_num;
}
}
@ -343,15 +343,11 @@ int CLIENT_STATE::choose_version_num(char* app_name, SCHEDULER_REPLY& sr) {
//
for (i=0; i<app_versions.size(); i++) {
avp = app_versions[i];
if (strcmp(avp->app_name, app_name)) continue;
if (avp->project != wup->project) continue;
if (strcmp(avp->app_name, wup->app_name)) continue;
if (avp->version_num < best) continue;
best = avp->version_num;
}
if (best < 0) {
msg_printf(0, MSG_ERROR,
"No version found for application %s", app_name
);
}
return best;
}

View File

@ -1037,7 +1037,8 @@ int CLIENT_STATE::handle_scheduler_reply(
if (lookup_workunit(project, sr.workunits[i].name)) continue;
WORKUNIT* wup = new WORKUNIT;
*wup = sr.workunits[i];
int vnum = choose_version_num(wup->app_name, sr);
wup->project = project;
int vnum = choose_version_num(wup, sr);
if (vnum < 0) {
msg_printf(project, MSG_ERROR,
"Can't find application version for task %s", wup->name