svn path=/trunk/boinc/; revision=17421

This commit is contained in:
David Anderson 2009-03-02 17:57:57 +00:00
parent 641ff01533
commit 63dfde353e
4 changed files with 36 additions and 21 deletions

View File

@ -2441,3 +2441,18 @@ David 1 Mar 2009
lib/
gui_rpc_client.h
gui_rpc_client_ops.cpp
David 2 Mar 2009
- fix bugs in the above.
- GUI RPC: remove unused items from get_state RPC: host_info, time_stats,
net_stats, host_venue
NOTE: any change to a GUI RPC struct requires changing AsyncRPC.cpp.
This is undesirable.
client/
cs_statefile.cpp
clientgui/
AsyncRPC.cpp
lib/
gui_rpc_client_ops.cpp

View File

@ -789,12 +789,14 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
f.printf("<client_state>\n");
#if 0
retval = host_info.write(f, false);
if (retval) return retval;
retval = time_stats.write(f, false);
if (retval) return retval;
retval = net_stats.write(f);
if (retval) return retval;
#endif
for (j=0; j<projects.size(); j++) {
PROJECT* p = projects[j];
@ -821,14 +823,14 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
"<core_client_major_version>%d</core_client_major_version>\n"
"<core_client_minor_version>%d</core_client_minor_version>\n"
"<core_client_release>%d</core_client_release>\n"
"%s"
"%s",
"<executing_as_daemon>%d</executing_as_daemon>\n"
"<have_cuda>%d</have_cuda>\n",
get_primary_platform(),
core_client_version.major,
core_client_version.minor,
core_client_version.release,
executing_as_daemon?"<executing_as_daemon/>\n":"",
work_fetch_no_new_work?"<work_fetch_no_new_work/>\n":""
executing_as_daemon?1:0,
coproc_cuda?1:0
);
for (i=0; i<platforms.size(); i++) {
f.printf(
@ -838,9 +840,11 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
global_prefs.write(f);
#if 0
if (strlen(main_host_venue)) {
f.printf("<host_venue>%s</host_venue>\n", main_host_venue);
}
#endif
f.printf("</client_state>\n");
return 0;

View File

@ -728,6 +728,7 @@ void CMainDocument::HandleCompletedRPC() {
exchangeBuf->global_prefs = arg1->global_prefs;
exchangeBuf->version_info = arg1->version_info;
exchangeBuf->executing_as_daemon = arg1->executing_as_daemon;
exchangeBuf->have_cuda = arg1->have_cuda;
}
break;
case RPC_GET_RESULTS:

View File

@ -1086,11 +1086,6 @@ int RPC_CLIENT::get_state(CC_STATE& state) {
}
if (match_tag(buf, "</client_state>")) break;
// the following are to handle responses from pre-5.6 core clients
// remove them 6/07
if (parse_int(buf, "<major_version>", state.version_info.major)) continue;
if (parse_int(buf, "<minor_version>", state.version_info.minor)) continue;
if (parse_int(buf, "<release>", state.version_info.release)) continue;
if (parse_bool(buf, "executing_as_daemon", state.executing_as_daemon)) continue;
if (parse_bool(buf, "have_cuda", state.have_cuda)) continue;
if (match_tag(buf, "<project>")) {