client: More efficient implementation of active_only flag in get_results RPC

svn path=/trunk/boinc/; revision=18817
This commit is contained in:
Charlie Fenton 2009-08-07 09:22:02 +00:00
parent 1c5cfe55d7
commit a47204f5e6
2 changed files with 12 additions and 6 deletions

View File

@ -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

View File

@ -874,13 +874,17 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
int CLIENT_STATE::write_tasks_gui(MIOFILE& f, bool active_only) {
unsigned int i;
for (i=0; i<results.size(); i++) {
RESULT* rp = results[i];
if (active_only) {
if (!active_tasks.lookup_result(rp)) continue;
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];
rp->write_gui(f);
}
rp->write_gui(f);
}
return 0;
}