Re: Your mailbox-updating patch
- From: Ian Campbell <ijc25 cam ac uk>
- To: Matthew Guenther <mguenthe attcanada ca>
- Cc: Balsa Discussion List <balsa-list gnome org>
- Subject: Re: Your mailbox-updating patch
- Date: Fri, 18 Aug 2000 09:24:30 +0100 (BST)
Hmm, the mailbox should be locked for both the syncing and checking, so
there should be no overlap. I am currently looking into threading issues.
I think the second part of this problem i caused by my attempt to solve a
problem I mentioned before:
When you open a mialbox with new messages and then close it, without
reading them, the closed mailbox would be marked as not having any new
messages (because the disk file was touched by opening it)
To fix this, I took a ->have_unread_message=FALSE out of
mailbox_close. However I think I should have update
libbalsa_mailbox_load_messages as well.
This has ( I think - it might be in libbalsa_mailbox_local_check
) something like
if ( mailbox->unread_messages > 0 )
libbalsa_mailbox_set_unread_messages_flag(mailbox, TRUE)
this should really be changed by adding an else ...flag(mailbox, FALSE) I
think (but I haven't tried it.)
Infact, the whole boolean param to set_unread_message_flag may be
redundant, since the function can work out for itslf what the flag should
be based on ->unread_messageI think almost evey call to it is
proceeded by some check on ->unread_messages. I will look into this.
On Thu, 17 Aug 2000, MatthewGuenther wrote:
> On Thu, Aug 17, 2000 at 10:12:12PM +0100, Ian Campbell wrote:
> >
> > I have just fixed the checking of closed IMAP mailboxes, which I have to admit
> > I forgot to do before.
> >
> > Was the problem with IMAP, or local?
> >
>
> It is local, I have no IMAP mailboxes. I have also discovered another
> problem, when the mailboxes are closed after reading all the messages,
> sometimes the mailbox shows up as having unread messages. This happens
> because the file(s) on disk is checked for unread messages before the program
> has finished syncing the mailbox on disk to the one from memory. This
> has been possible before, however it would self-correct before by clicking
> on another message, which would cause the mailboxes on disk to be
> re-checked. Your patch, it seems, does not do this, as I have closed a
> mailbox only to have it show as having unread messages. However when I
> attempted to fix it by clicking on another message or clicking on the check
> new mail button, nothing happened. Even re-opening and closing the
> mailbox would not fix the display. The only way to get a correct reading
> was to quit and restart the program.
>
> MBG
>
> --
> Matthew Guenther I've always considered statesmen to be
> mguenthe@attcanada.ca more expendable than soldiers.
> http://www.attcanada.ca/~mguenthe/
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]