Re: PATCH: Fic pop3 mailbox bug
- From: Carlos Morgado <chbm chbm nu>
- To: Balsa List <balsa-list gnome org>
- Cc: "M . Thielker" <balsa t-data com>
- Subject: Re: PATCH: Fic pop3 mailbox bug
- Date: Thu, 6 Sep 2001 15:19:23 +0100
On 2001.09.06 14:18:13 +0100 Peter Bloomfield wrote:
> If the first two tests succeed, you unlink the file and then drop
> through to `gtk_object_destroy(GTK_OBJECT(tmp_mailbox));' without
> first closing `tmp_mailbox'. The intent of the other paths seems to be
> to achieve a close-unlink-destroy or close-destroy sequence. If
> unlink-destroy is an acceptable sequence, the code could be
> simplified; otherwise, you probably need another close.
>
> Or have I missed something? The version I tried was:
>
> libbalsa_mailbox_open(tmp_mailbox);
> /* chbm: fixme - make this more linear */
> if ((m->inbox) && (tmp_mailbox->messages)
> && !libbalsa_messages_move(tmp_mailbox->message_list, m->inbox))
> {
> libbalsa_information(LIBBALSA_INFORMATION_WARNING,
> _("Error placing messages from %s on %s\n"
> "Messages are left in %s\n"),
> mailbox->name,
> LIBBALSA_MAILBOX(m->inbox)->name,
> tmp_path);
> libbalsa_mailbox_close(LIBBALSA_MAILBOX(tmp_mailbox));
> } else {
> libbalsa_mailbox_close(LIBBALSA_MAILBOX(tmp_mailbox));
> unlink((const char *) tmp_path);
> }
> gtk_object_destroy(GTK_OBJECT(tmp_mailbox));
> g_free(tmp_path);
> }
>
right! your's even looks better :)
melanie, does this work for you ? i'm inclined to go with this version.
this bug just seems so magical i'm not sure of anything anymore :\
--
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
Software is like sex; it's better when it's free. - Linus Torvalds
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]