Re: unexpunge segfaults with -l on some mailboxes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bron Gondwana wrote:
> On Mon, Mar 23, 2009 at 04:08:47PM -0700, David R Bosso wrote:
>> I'd love to see a fix for this.
> 
> Here's one:
> 
>>From 8448c2f304bd61fe073b1d98a0d614b69b0ee184
> Subject: [PATCH] Don't immediate expunge in ipurge
> 
> This has two benefits.
> 
> 1) you can unexpunge
> 2) it won't corrupt the cache pointers in the expunge file
> 
> NOTE: this only applies if you have delayed expunge enabled
> in your configuration, otherwise the behaviour is unchanged.
> ---
>  imap/ipurge.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/imap/ipurge.c b/imap/ipurge.c
> index a8c6228..1a76ede 100644
> --- a/imap/ipurge.c
> +++ b/imap/ipurge.c
> @@ -268,7 +268,7 @@ int purge_me(char *name, int matchlen __attribute__((unused)),
>    (void) mailbox_lock_index(&the_box);
>    the_box.index_lock_count = 1;
>  
> -  mailbox_expunge(&the_box, purge_check, &stats, EXPUNGE_FORCE);
> +  mailbox_expunge(&the_box, purge_check, &stats, 0);
>  
>    sync_log_mailbox(the_box.name);
>    mailbox_close(&the_box);

Looks good. Passes my earlier test. And you are correct. You can 
unexpunge messages that ipurge purges. Slick :-)


----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux