Commit d74b5f53 d74b5f53991d83e0a3c34e8d898cce942981ccb8 by Sergey Poznyakoff

Minor fix.

* libmailutils/mailbox.c (mu_mailbox_open): Return MU_ERR_OPEN
if the mailbox has already been opened.
1 parent 756eb2bc
...@@ -298,6 +298,8 @@ mu_mailbox_open (mu_mailbox_t mbox, int flag) ...@@ -298,6 +298,8 @@ mu_mailbox_open (mu_mailbox_t mbox, int flag)
298 return MU_ERR_MBX_NULL; 298 return MU_ERR_MBX_NULL;
299 if (mbox->_open == NULL) 299 if (mbox->_open == NULL)
300 return MU_ERR_EMPTY_VFN; 300 return MU_ERR_EMPTY_VFN;
301 if (mbox->flags & _MU_MAILBOX_OPEN)
302 return MU_ERR_OPEN;
301 if (flag & MU_STREAM_QACCESS) 303 if (flag & MU_STREAM_QACCESS)
302 { 304 {
303 /* Quick access mailboxes are read-only */ 305 /* Quick access mailboxes are read-only */
......