dovecot-1.2: SELECT: If closing old mailbox gives an error, don'...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 25 23:34:40 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/672fd089a8f7
changeset: 8339:672fd089a8f7
user: Timo Sirainen <tss at iki.fi>
date: Sat Oct 25 23:34:02 2008 +0300
description:
SELECT: If closing old mailbox gives an error, don't crash.
diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
src/imap/cmd-select.c | 9 +++++----
diffs (23 lines):
diff -r 0ee4090b85fe -r 672fd089a8f7 src/imap/cmd-select.c
--- a/src/imap/cmd-select.c Sat Oct 25 23:10:32 2008 +0300
+++ b/src/imap/cmd-select.c Sat Oct 25 23:34:02 2008 +0300
@@ -359,14 +359,15 @@ bool cmd_select_full(struct client_comma
client->mailbox_change_lock = cmd;
if (client->mailbox != NULL) {
+ struct mail_storage *old_storage =
+ mailbox_get_storage(client->mailbox);
+
client_search_updates_free(client);
box = client->mailbox;
client->mailbox = NULL;
- if (mailbox_close(&box) < 0) {
- client_send_untagged_storage_error(client,
- mailbox_get_storage(box));
- }
+ if (mailbox_close(&box) < 0)
+ client_send_untagged_storage_error(client, old_storage);
/* CLOSED response is required by QRESYNC */
client_send_line(client, "* OK [CLOSED]");
}
More information about the dovecot-cvs
mailing list