Mercurial > dovecot > core-2.2
changeset 1377:b0f075271b2f HEAD
Give BAD instead of NO when trying to use selected state command in
non-selected state.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 22 Apr 2003 21:37:58 +0300 |
parents | 1664a3d51a74 |
children | bda297ecd516 |
files | src/imap/commands-util.c |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/commands-util.c Tue Apr 22 21:35:47 2003 +0300 +++ b/src/imap/commands-util.c Tue Apr 22 21:37:58 2003 +0300 @@ -86,21 +86,25 @@ if (client->mailbox != NULL) return TRUE; else { - client_send_tagline(client, "NO No mailbox selected."); + client_send_tagline(client, "BAD No mailbox selected."); return FALSE; } } void client_sync_full(struct client *client) { - if (client->mailbox != NULL) - (void)client->mailbox->sync(client->mailbox, TRUE); + if (client->mailbox != NULL) { + if (!client->mailbox->sync(client->mailbox, TRUE)) + client_send_untagged_storage_error(client); + } } void client_sync_without_expunges(struct client *client) { - if (client->mailbox != NULL) - (void)client->mailbox->sync(client->mailbox, FALSE); + if (client->mailbox != NULL) { + if (!client->mailbox->sync(client->mailbox, FALSE)) + client_send_untagged_storage_error(client); + } } void client_send_storage_error(struct client *client)