mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pass context in mx_close_message

The mx_close_message is one of the few mx_* functions that don't have a
context as parameter. To make them more consistent, pass the context.

+22 -22
+1 -1
attach.c
··· 745 745 else 746 746 r = -1; 747 747 748 - mx_close_message (&msg); 748 + mx_close_message (&ctx, &msg); 749 749 mx_close_mailbox (&ctx, NULL); 750 750 return r; 751 751 }
+1 -1
commands.c
··· 993 993 } 994 994 995 995 h->security |= PGP_TRADITIONAL_CHECKED; 996 - mx_close_message (&msg); 996 + mx_close_message (Context, &msg); 997 997 return rv; 998 998 } 999 999
+3 -3
copy.c
··· 692 692 dprint (1, (debugfile, "_mutt_copy_message failed to detect EOF!\n")); 693 693 r = -1; 694 694 } 695 - mx_close_message (&msg); 695 + mx_close_message (src, &msg); 696 696 return r; 697 697 } 698 698 ··· 728 728 if (mx_commit_message (msg, dest) != 0) 729 729 r = -1; 730 730 731 - mx_close_message (&msg); 731 + mx_close_message (dest, &msg); 732 732 return r; 733 733 } 734 734 ··· 742 742 if ((msg = mx_open_message (src, hdr->msgno)) == NULL) 743 743 return -1; 744 744 r = _mutt_append_message (dest, msg->fp, src, hdr, hdr->content, cmflags, chflags); 745 - mx_close_message (&msg); 745 + mx_close_message (src, &msg); 746 746 return r; 747 747 } 748 748
+1 -1
editmsg.c
··· 187 187 } 188 188 189 189 rc = mx_commit_message (msg, &tmpctx); 190 - mx_close_message (&msg); 190 + mx_close_message (&tmpctx, &msg); 191 191 192 192 mx_close_mailbox (&tmpctx, NULL); 193 193
+1 -1
mailbox.h
··· 66 66 int mx_close_mailbox (CONTEXT *, int *); 67 67 int mx_sync_mailbox (CONTEXT *, int *); 68 68 int mx_commit_message (MESSAGE *, CONTEXT *); 69 - int mx_close_message (MESSAGE **); 69 + int mx_close_message (CONTEXT *, MESSAGE **); 70 70 int mx_get_magic (const char *); 71 71 int mx_set_magic (const char *); 72 72 int mx_check_mailbox (CONTEXT *, int *);
+2 -2
mh.c
··· 1656 1656 else 1657 1657 rc = _mh_commit_message (ctx, dest, h, 0); 1658 1658 1659 - mx_close_message (&dest); 1659 + mx_close_message (ctx, &dest); 1660 1660 1661 1661 if (rc == 0) 1662 1662 { ··· 1687 1687 } 1688 1688 } 1689 1689 else 1690 - mx_close_message (&dest); 1690 + mx_close_message (ctx, &dest); 1691 1691 1692 1692 if (rc == -1 && restore) 1693 1693 {
+1 -1
mx.c
··· 1389 1389 } 1390 1390 1391 1391 /* close a pointer to a message */ 1392 - int mx_close_message (MESSAGE **msg) 1392 + int mx_close_message (CONTEXT *ctx, MESSAGE **msg) 1393 1393 { 1394 1394 int r = 0; 1395 1395
+1 -1
parse.c
··· 969 969 if (WithCrypto) 970 970 cur->security = crypt_query (cur->content); 971 971 972 - mx_close_message (&msg); 972 + mx_close_message (ctx, &msg); 973 973 } 974 974 } while (0); 975 975
+2 -2
pattern.c
··· 180 180 if (WithCrypto && (h->security & ENCRYPT) 181 181 && !crypt_valid_passphrase(h->security)) 182 182 { 183 - mx_close_message (&msg); 183 + mx_close_message (ctx, &msg); 184 184 if (s.fpout) 185 185 { 186 186 safe_fclose (&s.fpout); ··· 239 239 240 240 FREE (&buf); 241 241 242 - mx_close_message (&msg); 242 + mx_close_message (ctx, &msg); 243 243 244 244 if (option (OPTTHOROUGHSRC)) 245 245 {
+1 -1
pop.c
··· 874 874 ret = -3; 875 875 } 876 876 877 - mx_close_message (&msg); 877 + mx_close_message (&ctx, &msg); 878 878 } 879 879 880 880 if (ret == 0 && delanswer == MUTT_YES)
+2 -2
postpone.c
··· 586 586 || b == NULL) 587 587 { 588 588 err: 589 - mx_close_message (&msg); 589 + mx_close_message (ctx, &msg); 590 590 mutt_free_envelope (&newhdr->env); 591 591 mutt_free_body (&newhdr->content); 592 592 mutt_error _("Decryption failed."); ··· 735 735 736 736 /* that's it. */ 737 737 if (bfp != fp) safe_fclose (&bfp); 738 - if (msg) mx_close_message (&msg); 738 + if (msg) mx_close_message (ctx, &msg); 739 739 740 740 if (rv == -1) 741 741 {
+3 -3
recvattach.c
··· 966 966 967 967 if ((hdr->security & ENCRYPT) && !crypt_valid_passphrase(hdr->security)) 968 968 { 969 - mx_close_message (&msg); 969 + mx_close_message (Context, &msg); 970 970 return; 971 971 } 972 972 if ((WithCrypto & APPLICATION_SMIME) && (hdr->security & APPLICATION_SMIME)) ··· 1006 1006 1007 1007 if (need_secured && !secured) 1008 1008 { 1009 - mx_close_message (&msg); 1009 + mx_close_message (Context, &msg); 1010 1010 mutt_error _("Can't decrypt encrypted message!"); 1011 1011 return; 1012 1012 } ··· 1239 1239 break; 1240 1240 1241 1241 case OP_EXIT: 1242 - mx_close_message (&msg); 1242 + mx_close_message (Context, &msg); 1243 1243 hdr->attach_del = 0; 1244 1244 while (idxmax-- > 0) 1245 1245 {
+3 -3
sendlib.c
··· 2573 2573 } 2574 2574 2575 2575 if (msg) 2576 - mx_close_message (&msg); 2576 + mx_close_message (Context, &msg); 2577 2577 2578 2578 return ret; 2579 2579 } ··· 2847 2847 safe_fclose (&tempfp); 2848 2848 unlink (tempfile); 2849 2849 mx_commit_message (msg, &f); /* XXX - really? */ 2850 - mx_close_message (&msg); 2850 + mx_close_message (&f, &msg); 2851 2851 mx_close_mailbox (&f, NULL); 2852 2852 return -1; 2853 2853 } ··· 2876 2876 2877 2877 if (mx_commit_message (msg, &f) != 0) 2878 2878 r = -1; 2879 - mx_close_message (&msg); 2879 + mx_close_message (&f, &msg); 2880 2880 mx_close_mailbox (&f, NULL); 2881 2881 2882 2882 if (!post && need_buffy_cleanup)