Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv5102a/src/mail
Modified Files:
MailFolderCC.cpp
Log Message:
hopefully fixed the message status update bug when it would get out of sync with
reality if new messages were received while expunging some other ones
Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.623
retrieving revision 1.624
diff -b -u -2 -r1.623 -r1.624
--- MailFolderCC.cpp 12 Jun 2002 17:58:07 -0000 1.623
+++ MailFolderCC.cpp 4 Jul 2002 13:53:06 -0000 1.624
@@ -3605,6 +3605,6 @@
CHECK( count, true, "SaveMessages(): nothing to save" );
- wxLogTrace(TRACE_MF_CALLS, "MailFolderCC(%s)::SaveMessages()",
- GetName().c_str());
+ wxLogTrace(TRACE_MF_CALLS, "MailFolderCC(%s)::SaveMessages(%s)",
+ GetName().c_str(), folder->GetFullName().c_str());
/*
@@ -4380,9 +4380,17 @@
if ( (!isDeleted && msgStatusNew.what) && \
(wasDeleted || !msgStatusOld.what) ) \
+ { \
+ wxLogTrace(M_TRACE_MFSTATUS, "%s: " #what "++ (now %lu)", \
+ GetName().c_str(), status.what + 1); \
status.what++; \
+ } \
else if ( (!wasDeleted && msgStatusOld.what) && \
(isDeleted || !msgStatusNew.what) ) \
if ( status.what > 0 ) \
+ { \
+ wxLogTrace(M_TRACE_MFSTATUS, "%s: " #what "-- (now %lu)", \
+ GetName().c_str(), status.what - 1); \
status.what--; \
+ } \
else \
FAIL_MSG( "error in msg status change logic" )
@@ -4445,4 +4453,6 @@
hi->m_Status = statusNew;
+ if ( MfStatusCache::Get()->GetStatus(GetName()) )
+ {
// we send the event telling us that we have some messages with the
// changed status only once, when we get the first notification - and
@@ -4473,4 +4483,10 @@
}
}
+ //else: don't update the status because we don't have anything to update
+ // and, worse, we might obtain the new message status before we get
+ // to OnMsgStatusChanged() and then we'd apply the updates
+ // pertaining to the old status to the new values which would make
+ // them out of sync with the real values
+ }
//else: flags didn't really change
}
@@ -5195,6 +5211,6 @@
{
// we often receive two "* EXISTS" in a row (this seems to be a bug in
- // the IMAP I use but it does happen all the time) and in this case we
- // don't want to send two MEventFolderOnNewMails
+ // the IMAP server I use but it does happen all the time) and in this
+ // case we don't want to send two MEventFolderOnNewMails
if ( !m_gotUnprocessedNewMail )
{
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates