- GUI RPC: restore <have_cuda>, <have_ati> elements in CC_STATE for compatibility

- client: copy coprocs to host_info._coprocs at startup
		(else GUI RPCs don't have right info)

svn path=/trunk/boinc/; revision=23757
This commit is contained in:
David Anderson 2011-06-20 23:18:37 +00:00
parent 53bc917999
commit 6c59ef3bff
4 changed files with 22 additions and 3 deletions

View File

@ -372,6 +372,7 @@ int CLIENT_STATE::init() {
coprocs.add(coprocs.ati);
}
}
host_info._coprocs = coprocs;
// check for app_info.xml file in project dirs.
// If find, read app info from there, set project.anonymous_platform

View File

@ -899,6 +899,16 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
//
retval = host_info.write(f, true, false);
if (retval) return retval;
// the following are for compatibility with old managers
//
if (coprocs.have_nvidia()) {
f.printf("<have_cuda/>\n");
}
if (coprocs.have_ati()) {
f.printf("<have_ati/>\n");
}
retval = time_stats.write(f, false);
if (retval) return retval;
retval = net_stats.write(f);

View File

@ -378,8 +378,10 @@ public:
// platforms supported by client
GLOBAL_PREFS global_prefs; // working prefs, i.e. network + override
VERSION_INFO version_info; // populated only if talking to pre-5.6 CC
bool executing_as_daemon; // true if Client is running as a service / daemon
bool executing_as_daemon; // true if client is running as a service / daemon
HOST_INFO host_info;
bool have_cuda; // redundant; include for compat
bool have_ati; // redundant; include for compat
CC_STATE();
~CC_STATE();

View File

@ -108,10 +108,14 @@ int PROJECT_LIST_ENTRY::parse(XML_PARSER& xp) {
while (!xp.get(tag, sizeof(tag), is_tag)) {
if (!strcmp(tag, "/project")) return 0;
if (xp.parse_string(tag, "name", name)) continue;
if (xp.parse_string(tag, "url", url)) continue;
if (xp.parse_string(tag, "url", url)) {
continue;
}
if (xp.parse_string(tag, "general_area", general_area)) continue;
if (xp.parse_string(tag, "specific_area", specific_area)) continue;
if (xp.parse_string(tag, "description", description)) continue;
if (xp.parse_string(tag, "description", description)) {
continue;
}
if (xp.parse_string(tag, "home", home)) continue;
if (xp.parse_string(tag, "image", image)) continue;
if (!strcmp(tag, "platforms")) {
@ -852,6 +856,8 @@ int CC_STATE::parse(MIOFILE& fin) {
host_info.parse(fin);
continue;
}
if (parse_bool(buf, "have_cuda", have_cuda)) continue;
if (parse_bool(buf, "have_ati", have_ati)) continue;
}
return 0;
}