# HG changeset patch
# User Damien Riegel <[email protected]>
# Date 1462471894 14400
#      Thu May 05 14:11:34 2016 -0400
# Node ID 8bd12e036c3eb78a14e32cafd3d2da5cfbfc3fb1
# Parent  2587d69eddd66e623c4f82c5099cdf4a49bb5315
add a stub mbox_close_mailbox function

This function does nothing, the main purpose is to introduce a mx_ops
structure for mbox, so its usage is similar to mh/imap/pop. We reuse the
name that was made available by the previous commmit.

Note that the actual closing of the descriptor is done in mx.c.

diff -r 2587d69eddd6 -r 8bd12e036c3e mbox.c
--- a/mbox.c    Wed May 04 17:36:23 2016 -0400
+++ b/mbox.c    Thu May 05 14:11:34 2016 -0400
@@ -411,6 +411,15 @@
 
 #undef PREV
 
+static int mbox_close_mailbox (CONTEXT *ctx)
+{
+  return 0;
+}
+
+struct mx_ops mx_mbox_ops = {
+  .close = mbox_close_mailbox,
+};
+
 /* open a mbox or mmdf style mailbox */
 int mbox_open_mailbox (CONTEXT *ctx)
 {
@@ -435,6 +444,8 @@
   else
     rc = -1;
 
+  ctx->mx_ops = &mx_mbox_ops;
+
   mbox_unlock_mailbox (ctx);
   mutt_unblock_signals ();
   return (rc);

Reply via email to