mirror of https://github.com/BOINC/boinc.git
- client: if using anonymous platform, ignore (and complain about)
app versions in scheduler reply - client: when reporting anonymous platform apps in sched request, don't include <file_info>s (not relevant to server) svn path=/trunk/boinc/; revision=17507
This commit is contained in:
parent
e6f3027567
commit
e74f93c10d
|
@ -2681,3 +2681,14 @@ David 5 Mar 2009
|
|||
handle_request.cpp
|
||||
server_types.cpp,h
|
||||
sched_send.cpp
|
||||
|
||||
David 5 Mar 2009
|
||||
- client: if using anonymous platform, ignore (and complain about)
|
||||
app versions in scheduler reply
|
||||
- client: when reporting anonymous platform apps in sched request,
|
||||
don't include <file_info>s (not relevant to server)
|
||||
|
||||
client/
|
||||
client_types.cpp,h
|
||||
cs_scheduler.cpp
|
||||
cs_statefile.cpp
|
||||
|
|
|
@ -1157,7 +1157,7 @@ int APP_VERSION::parse(MIOFILE& in) {
|
|||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
||||
int APP_VERSION::write(MIOFILE& out) {
|
||||
int APP_VERSION::write(MIOFILE& out, bool write_file_info) {
|
||||
unsigned int i;
|
||||
int retval;
|
||||
|
||||
|
@ -1185,9 +1185,11 @@ int APP_VERSION::write(MIOFILE& out) {
|
|||
if (strlen(cmdline)) {
|
||||
out.printf(" <cmdline>%s</cmdline>\n", cmdline);
|
||||
}
|
||||
for (i=0; i<app_files.size(); i++) {
|
||||
retval = app_files[i].write(out);
|
||||
if (retval) return retval;
|
||||
if (write_file_info) {
|
||||
for (i=0; i<app_files.size(); i++) {
|
||||
retval = app_files[i].write(out);
|
||||
if (retval) return retval;
|
||||
}
|
||||
}
|
||||
coprocs.write_xml(out);
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ struct APP_VERSION {
|
|||
APP_VERSION(){}
|
||||
~APP_VERSION(){}
|
||||
int parse(MIOFILE&);
|
||||
int write(MIOFILE&);
|
||||
int write(MIOFILE&, bool write_file_info = true);
|
||||
bool had_download_failure(int& failnum);
|
||||
void get_file_errors(std::string&);
|
||||
void clear_errors();
|
||||
|
|
|
@ -148,7 +148,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
|
|||
for (i=0; i<app_versions.size(); i++) {
|
||||
APP_VERSION* avp = app_versions[i];
|
||||
if (avp->project != p) continue;
|
||||
avp->write(mf);
|
||||
avp->write(mf, false);
|
||||
}
|
||||
fprintf(f, " </app_versions>\n");
|
||||
}
|
||||
|
@ -700,6 +700,12 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
|
|||
}
|
||||
}
|
||||
for (i=0; i<sr.app_versions.size(); i++) {
|
||||
if (project->anonymous_platform) {
|
||||
msg_printf(project, MSG_INTERNAL_ERROR,
|
||||
"App version returned from anonymous platform project; ignoring"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
APP_VERSION& avpp = sr.app_versions[i];
|
||||
if (strlen(avpp.platform) == 0) {
|
||||
strcpy(avpp.platform, get_primary_platform());
|
||||
|
@ -712,6 +718,9 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
|
|||
}
|
||||
}
|
||||
if (avpp.missing_coproc()) {
|
||||
msg_printf(project, MSG_INTERNAL_ERROR,
|
||||
"App version uses non-existent coprocessor; ignoring"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
APP* app = lookup_app(project, avpp.app_name);
|
||||
|
|
|
@ -722,6 +722,8 @@ void CLIENT_STATE::check_anonymous() {
|
|||
}
|
||||
}
|
||||
|
||||
// parse a project's app_info.xml (anonymous platform) file
|
||||
//
|
||||
int CLIENT_STATE::parse_app_info(PROJECT* p, FILE* in) {
|
||||
char buf[256];
|
||||
MIOFILE mf;
|
||||
|
|
Loading…
Reference in New Issue