From 84ee96e04e486b0abf7f0e6d827f06343b340fbc Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 30 Mar 2009 18:45:32 +0000 Subject: [PATCH] - 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 --- checkin_notes | 8 ++++++++ lib/gui_rpc_client_ops.cpp | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index a0edadb9d6..d296b22dd7 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index 388f55a2b4..47c56f91a6 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -364,7 +364,20 @@ RESULT::~RESULT() { int RESULT::parse(MIOFILE& in) { char buf[256]; while (in.fgets(buf, 256)) { - if (match_tag(buf, "")) return 0; + if (match_tag(buf, "")) { + // 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)) continue; if (parse_str(buf, "", wu_name)) continue; if (parse_int(buf, "", version_num)) continue;