summaryrefslogtreecommitdiffstats
path: root/mh.c
diff options
context:
space:
mode:
authorDamien Riegel <damien.riegel@gmail.com>2016-06-18 12:41:45 -0700
committerDamien Riegel <damien.riegel@gmail.com>2016-06-18 12:41:45 -0700
commit1552f6bcfb995110a34ddb32b117b967a2d9ad88 (patch)
tree951d04e3fdcdfb6ffaf075c2d82fbe757aa24d1d /mh.c
parent8778153bac54fd9914bab8b1b23d30bde575fc80 (diff)
add close_msg to struct mx_ops
Diffstat (limited to 'mh.c')
-rw-r--r--mh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mh.c b/mh.c
index 45496508..41795713 100644
--- a/mh.c
+++ b/mh.c
@@ -1369,6 +1369,11 @@ static int mh_open_message (CONTEXT *ctx, MESSAGE *msg, int msgno)
return maildir_mh_open_message (ctx, msg, msgno, 0);
}
+static int mh_close_message (CONTEXT *ctx, MESSAGE *msg)
+{
+ return safe_fclose (&msg->fp);
+}
+
/*
* Open a new (temporary) message in a maildir folder.
*
@@ -2445,6 +2450,7 @@ struct mx_ops mx_maildir_ops = {
.open = maildir_open_mailbox,
.close = mh_close_mailbox,
.open_msg = maildir_open_message,
+ .close_msg = mh_close_message,
.open_new_msg = maildir_open_new_message,
.check = maildir_check_mailbox,
};
@@ -2453,6 +2459,7 @@ struct mx_ops mx_mh_ops = {
.open = mh_open_mailbox,
.close = mh_close_mailbox,
.open_msg = mh_open_message,
+ .close_msg = mh_close_message,
.open_new_msg = mh_open_new_message,
.check = mh_check_mailbox,
};