mirror of https://github.com/BOINC/boinc.git
- 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:
parent
f90871a141
commit
84ee96e04e
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue