dovecot-2.0: virtual: Added support for IDLE notifications.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Aug 4 18:54:20 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/eb1f471a924d
changeset: 11930:eb1f471a924d
user: Timo Sirainen <tss at iki.fi>
date: Wed Aug 04 16:54:17 2010 +0100
description:
virtual: Added support for IDLE notifications.
diffstat:
src/plugins/virtual/virtual-storage.c | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r e9cc262e4bbb -r eb1f471a924d src/plugins/virtual/virtual-storage.c
--- a/src/plugins/virtual/virtual-storage.c Wed Aug 04 16:28:10 2010 +0100
+++ b/src/plugins/virtual/virtual-storage.c Wed Aug 04 16:54:17 2010 +0100
@@ -356,9 +356,29 @@
return -1;
}
-static void virtual_notify_changes(struct mailbox *box ATTR_UNUSED)
+static void
+virtual_notify_callback(struct mailbox *bbox ATTR_UNUSED, struct mailbox *box)
{
- /* FIXME: maybe some day */
+ box->notify_callback(box, box->notify_context);
+}
+
+static void virtual_notify_changes(struct mailbox *box)
+{
+ struct virtual_mailbox *mbox = (struct virtual_mailbox *)box;
+ struct virtual_backend_box *const *bboxes;
+ unsigned int i, count;
+
+ bboxes = array_get(&mbox->backend_boxes, &count);
+ for (i = 0; i < count; i++) {
+ struct mailbox *bbox = bboxes[i]->box;
+
+ if (box->notify_callback == NULL)
+ mailbox_notify_changes_stop(bbox);
+ else {
+ mailbox_notify_changes(bbox, box->notify_min_interval,
+ virtual_notify_callback, box);
+ }
+ }
}
static int
More information about the dovecot-cvs
mailing list