# HG changeset patch
# User Damien Riegel <[email protected]>
# Date 1462473615 14400
# Thu May 05 14:40:15 2016 -0400
# Node ID 742779f8f5116d86a0a73cc17a10d725f56664b6
# Parent 58de0881dedec01e9dedcfa14c2fbb48ed6135db
populate open callback for all mailboxes
Reuse functions that were used in the switch case of mx_open_mailbox.
While we're at it, create a dedicated structure for mmdf mailbox as it
might be necessary in the future to use different callbacks.
diff -r 58de0881dede -r 742779f8f511 imap/imap.c
--- a/imap/imap.c Thu May 05 14:39:35 2016 -0400
+++ b/imap/imap.c Thu May 05 14:40:15 2016 -0400
@@ -555,6 +555,7 @@
}
struct mx_ops mx_imap_ops = {
+ .open = imap_open_mailbox,
.close = imap_close_mailbox,
};
diff -r 58de0881dede -r 742779f8f511 mbox.c
--- a/mbox.c Thu May 05 14:39:35 2016 -0400
+++ b/mbox.c Thu May 05 14:40:15 2016 -0400
@@ -417,6 +417,12 @@
}
struct mx_ops mx_mbox_ops = {
+ .open = mbox_open_mailbox,
+ .close = mbox_close_mailbox,
+};
+
+struct mx_ops mx_mmdf_ops = {
+ .open = mbox_open_mailbox,
.close = mbox_close_mailbox,
};
diff -r 58de0881dede -r 742779f8f511 mh.c
--- a/mh.c Thu May 05 14:39:35 2016 -0400
+++ b/mh.c Thu May 05 14:40:15 2016 -0400
@@ -1162,10 +1162,12 @@
}
struct mx_ops mx_maildir_ops = {
+ .open = maildir_open_mailbox,
.close = mh_close_mailbox,
};
struct mx_ops mx_mh_ops = {
+ .open = mh_open_mailbox,
.close = mh_close_mailbox,
};
diff -r 58de0881dede -r 742779f8f511 pop.c
--- a/pop.c Thu May 05 14:39:35 2016 -0400
+++ b/pop.c Thu May 05 14:40:15 2016 -0400
@@ -397,6 +397,7 @@
}
struct mx_ops mx_pop_ops = {
+ .open = pop_open_mailbox,
.close = pop_close_mailbox,
};