diff src/lib-storage/list/mailbox-list-index-notify.c @ 22081:c5eae96dcd71

lib-storage: Implement mailbox_list_notify_flush() This flushes any pending notifications. For now it only checks if there's a pending notification waiting for a timeout. It could also stat() the files to make sure, but that's probably unnecessary.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 17 May 2017 19:01:57 +0300
parents f2b50a4a6951
children 725057ef25e4
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-index-notify.c	Wed May 17 18:13:09 2017 +0300
+++ b/src/lib-storage/list/mailbox-list-index-notify.c	Wed May 17 19:01:57 2017 +0300
@@ -876,3 +876,12 @@
 		notify_update_stat(inotify);
 	}
 }
+
+void mailbox_list_index_notify_flush(struct mailbox_list_notify *notify)
+{
+	struct mailbox_list_notify_index *inotify =
+		(struct mailbox_list_notify_index *)notify;
+
+	if (inotify->to_notify != NULL)
+		notify_now_callback(inotify);
+}