- GUI RPC: return notices in order of increasing seqno, not decreasing

svn path=/trunk/boinc/; revision=20072
This commit is contained in:
David Anderson 2010-01-05 01:56:30 +00:00
parent 9bff57e3b8
commit bd93c0dde2
2 changed files with 10 additions and 1 deletions

View File

@ -47,3 +47,8 @@ Rom 4 Jan 2010
clientgui/
MainDocument.cpp
ViewNotifications.cpp, .h
David 4 Jan 2010
- GUI RPC: return notices in order of increasing seqno, not decreasing
client/
cs_notice.cpp

View File

@ -304,7 +304,8 @@ void NOTICES::write_archive(char* url) {
fclose(f);
}
// write notices newer than seqno as XML (for GUI RPC)
// write notices newer than seqno as XML (for GUI RPC).
// Write them in order of increasing seqno
//
void NOTICES::write(int seqno, MIOFILE& fout, bool public_only) {
unsigned int i;
@ -312,6 +313,9 @@ void NOTICES::write(int seqno, MIOFILE& fout, bool public_only) {
for (i=0; i<notices.size(); i++) {
NOTICE& n = notices[i];
if (n.seqno <= seqno) break;
}
for (; i>0; i--) {
NOTICE& n = notices[i-1];
if (public_only && n.is_private) continue;
n.write(fout, true);
}