changeset 19932:5920e652d82c

virtual plugin: Fixed off-by-one in virtual_max_open_mailboxes check.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 16 Mar 2016 10:55:01 +1100
parents 1ac2290a887f
children 159b933b617d
files src/plugins/virtual/virtual-storage.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/virtual/virtual-storage.c	Wed Mar 16 10:33:26 2016 +1100
+++ b/src/plugins/virtual/virtual-storage.c	Wed Mar 16 10:55:01 2016 +1100
@@ -371,7 +371,7 @@
 
 	/* 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))
 		;