# HG changeset patch # User Timo Sirainen # Date 1505126897 -10800 # Node ID 98d99bf6511e9809d7cfcf9ef76922bd37ebcd4e # Parent c6ad67e373f52722311553bd2689bd95c7fde86f 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. diff -r c6ad67e373f5 -r 98d99bf6511e src/lib-storage/list/mailbox-list-index-notify.c --- 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); }