Mercurial > dovecot > core-2.2
diff src/lib-storage/list/mailbox-list-index-notify.c @ 22604:98d99bf6511e
lib-storage: Make sure mailbox list notification flush sees latest changes.
This is mainly useful with imaptest test scripts to make sure they're seeing
the changes done by the other session, without assuming that inotify will
always notify about the change before NOOP is run (it doesn't).
Do this only if mailbox_idle_check_interval>0, so it's not run when periodic
stat()s are wanted to be avoided.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 11 Sep 2017 13:48:17 +0300 |
parents | 71589abee915 |
children | cb108f786fb4 |
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-index-notify.c Tue Oct 10 15:38:13 2017 +0300 +++ b/src/lib-storage/list/mailbox-list-index-notify.c Mon Sep 11 13:48:17 2017 +0300 @@ -937,6 +937,11 @@ struct mailbox_list_notify_index *inotify = (struct mailbox_list_notify_index *)notify; + if (inotify->to_notify == NULL && + notify->list->mail_set->mailbox_idle_check_interval > 0) { + /* no pending notification - check if anything had changed */ + notify_callback(inotify); + } if (inotify->to_notify != NULL) notify_now_callback(inotify); }