From 6c59ef3bff9d8c161511e3c1a5036035fa591a88 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 20 Jun 2011 23:18:37 +0000 Subject: [PATCH] - GUI RPC: restore , 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 --- client/client_state.cpp | 1 + client/cs_statefile.cpp | 10 ++++++++++ lib/gui_rpc_client.h | 4 +++- lib/gui_rpc_client_ops.cpp | 10 ++++++++-- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/client/client_state.cpp b/client/client_state.cpp index ddab0330ee..73fe64158c 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -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 diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp index 7f3a29b196..25b2c6aa43 100644 --- a/client/cs_statefile.cpp +++ b/client/cs_statefile.cpp @@ -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("\n"); + } + if (coprocs.have_ati()) { + f.printf("\n"); + } + retval = time_stats.write(f, false); if (retval) return retval; retval = net_stats.write(f); diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h index ac271396ee..6b9e4b9a0a 100644 --- a/lib/gui_rpc_client.h +++ b/lib/gui_rpc_client.h @@ -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(); diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index bdcc1934b0..e314096bc0 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -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; }