mirror of https://github.com/BOINC/boinc.git
client: More efficient implementation of active_only flag in get_results RPC
svn path=/trunk/boinc/; revision=18817
This commit is contained in:
parent
1c5cfe55d7
commit
a47204f5e6
|
@ -6758,6 +6758,8 @@ Charlie 3 Aug 2009
|
|||
|
||||
Charlie 7 Aug 2009
|
||||
- MGR: Implement "Show active tasks / Show all tasks" button.
|
||||
- client: More efficient implementation of active_only flag in
|
||||
get_results RPC.
|
||||
|
||||
clientgui/
|
||||
AsyncRPC.cpp, .h
|
||||
|
|
|
@ -875,13 +875,17 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
|
|||
int CLIENT_STATE::write_tasks_gui(MIOFILE& f, bool active_only) {
|
||||
unsigned int i;
|
||||
|
||||
if (active_only) {
|
||||
for (i=0; i<active_tasks.active_tasks.size(); i++) {
|
||||
RESULT* rp = active_tasks.active_tasks[i]->result;
|
||||
rp->write_gui(f);
|
||||
}
|
||||
} else {
|
||||
for (i=0; i<results.size(); i++) {
|
||||
RESULT* rp = results[i];
|
||||
if (active_only) {
|
||||
if (!active_tasks.lookup_result(rp)) continue;
|
||||
}
|
||||
rp->write_gui(f);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue