- GUI RPC: client side: if parse a RESULT and CPU is nonzero

but elapsed time is zero, we must be talking to an old client;
    set elapsed = CPU

svn path=/trunk/boinc/; revision=17704
This commit is contained in:
David Anderson 2009-03-30 18:45:32 +00:00
parent f90871a141
commit 84ee96e04e
2 changed files with 22 additions and 1 deletions

View File

@ -3478,3 +3478,11 @@ David 30 Mar 2009
tools/
boinc_submit
create_work.cpp
David 30 Mar 2009
- GUI RPC: client side: if parse a RESULT and CPU is nonzero
but elapsed time is zero, we must be talking to an old client;
set elapsed = CPU
lib/
gui_rpc_client_ops.cpp

View File

@ -364,7 +364,20 @@ RESULT::~RESULT() {
int RESULT::parse(MIOFILE& in) {
char buf[256];
while (in.fgets(buf, 256)) {
if (match_tag(buf, "</result>")) return 0;
if (match_tag(buf, "</result>")) {
// if CPU time is nonzero but elapsed time is zero,
// we must be talking to an old client.
// Set elapsed = CPU
// (easier to deal with this here than in the manager)
//
if (current_cpu_time && !elapsed_time) {
elapsed_time = current_cpu_time;
}
if (final_cpu_time && !final_elapsed_time) {
final_elapsed_time = final_cpu_time;
}
return 0;
}
if (parse_str(buf, "<name>", name)) continue;
if (parse_str(buf, "<wu_name>", wu_name)) continue;
if (parse_int(buf, "<version_num>", version_num)) continue;