]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
virtual plugin: Fixed off-by-one in virtual_max_open_mailboxes check.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 15 Mar 2016 23:55:01 +0000 (10:55 +1100)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 16 Mar 2016 00:03:05 +0000 (11:03 +1100)
src/plugins/virtual/virtual-storage.c

index 4eed40a2fc96384854608e4942b97f0366cb1384..908fe30f81f84d218bda1ede99ed6924ea61e63d 100644 (file)
@@ -371,7 +371,7 @@ void virtual_backend_mailbox_opened(struct mailbox *box)
 
        /* the backend mailbox was already opened. if we didn't get here
           from virtual_backend_box_open() we may need to close a mailbox */
-       while (mbox->backends_open_count > mbox->storage->max_open_mailboxes &&
+       while (mbox->backends_open_count >= mbox->storage->max_open_mailboxes &&
               virtual_backend_box_close_any_except(mbox, bbox))
                ;