• Patch: Elm ME+ 2.5 PLalpha49 -> Elm ME+ 2.5 PLalpha50 [5/7] (2/4)

    From Kari Hurtta@21:1/5 to All on Mon Jun 10 20:55:12 2019
    [continued from previous message]

    /* This also free's folder */
    ! r = free_mailbox(& main_mailbox, cd);
    ! if (!r) {
    ! DPRINT(Debug,9, (&Debug,
    ! "initialize_mailbox_from_url: free_mailbox failed\n"));
    ! }
    ! if (is_canceled(cd)) {
    ! DPRINT(Debug,9, (&Debug,
    ! "initialize_mailbox_from_url: Cancel on free_mailbox\n"));
    ! }
    }

    fail:
    ! if (folder) {
    ! int r;
    !
    ! if (!cd)
    ! cd = new_schedule_cancel(exit_delay_msec,
    ! CATGETS(elm_msg_cat, ElmSet,
    ! ElmLeavingMailbox,
    ! "Leaving mailbox ..."));
    !
    ! DPRINT(Debug,9, (&Debug,
    ! "initialize_mailbox_from_url: freeing folder\n"));
    !
    ! r = leave_old_folder(&folder,CLOSE_NORMAL,cd);
    !
    ! if (!r) {
    ! DPRINT(Debug,9, (&Debug,
    ! "initialize_mailbox_from_url: leave_old_folder failed\n"));
    ! }
    ! if (is_canceled(cd)) {
    ! DPRINT(Debug,9, (&Debug,
    ! "initialize_mailbox_from_url: Cancel on leave_old_folder (or free_mailbox)\n"));
    ! }
    ! }
    !
    ! if (cd)
    ! free_cancel(&cd);

    return main_mailbox;
    }
    Index: elmME+.2.5.alpha50-cvs/src/leavembox.c
    *** elmME+.2.5.alpha49/src/leavembox.c Fri Oct 21 12:45:37 2016
    --- elmME+.2.5.alpha50-cvs/src/leavembox.c Tue May 7 20:49:09 2019 ***************
    *** 1,7 ****
    ! static char rcsid[] = "@(#)$Id: leavembox.c,v 2.10 2016/10/18 17:52:59 hurtta Exp $";

    /******************************************************************************
    ! * The Elm (ME+) Mail System - $Revision: 2.10 $ $State: Exp $
    *
    * Modified by: Kari Hurtta <hurtta+elm@siilo.FMI.FI>
    * (was hurtta+elm@posti.FMI.FI, hurtta+elm@ozone.FMI.FI)
    --- 1,7 ----
    ! static char rcsid[] = "@(#)$Id: leavembox.c,v 2.13 2019/05/07 17:49:09 hurtta Exp $";

    /******************************************************************************
    ! * The Elm (ME+) Mail System - $Revision: 2.13 $ $State: Exp $
    *
    * Modified by: Kari Hurtta <hurtta+elm@siilo.FMI.FI>
    * (was hurtta+elm@posti.FMI.FI, hurtta+elm@ozone.FMI.FI)
    ***************
    *** 128,134 ****
    }
    }

    ! static int real_save P_((struct current_storage *storage,
    struct f