mirror of https://github.com/BOINC/boinc.git
- GUI RPC: return notices in order of increasing seqno, not decreasing
svn path=/trunk/boinc/; revision=20072
This commit is contained in:
parent
9bff57e3b8
commit
bd93c0dde2
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue