Mercurial > dovecot > core-2.2
changeset 21747:844b8d462f44
lib-storage & imap: add MAIL_ERROR_UNAVAILABLE as [UNAVAILABLE]
[UNAVAILABLE] is defined in RFC 5530 and we were just missing a MAIL_ERROR_*
constant to make use of it.
author | Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
---|---|
date | Mon, 27 Feb 2017 18:13:54 -0500 |
parents | 574ad44a7c80 |
children | 1d329b71c6d8 |
files | src/doveadm/doveadm-mail.c src/imap/imap-commands-util.c src/lib-storage/mail-error.h |
diffstat | 3 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/doveadm-mail.c Wed Mar 08 15:39:34 2017 -0500 +++ b/src/doveadm/doveadm-mail.c Mon Feb 27 18:13:54 2017 -0500 @@ -59,6 +59,7 @@ case MAIL_ERROR_NONE: i_unreached(); case MAIL_ERROR_TEMP: + case MAIL_ERROR_UNAVAILABLE: break; case MAIL_ERROR_NOTPOSSIBLE: case MAIL_ERROR_EXISTS:
--- a/src/imap/imap-commands-util.c Wed Mar 08 15:39:34 2017 -0500 +++ b/src/imap/imap-commands-util.c Mon Feb 27 18:13:54 2017 -0500 @@ -144,6 +144,9 @@ case MAIL_ERROR_LOOKUP_ABORTED: /* BUG: shouldn't be visible here */ resp_code = IMAP_RESP_CODE_SERVERBUG; break; + case MAIL_ERROR_UNAVAILABLE: + resp_code = IMAP_RESP_CODE_UNAVAILABLE; + break; case MAIL_ERROR_NOTPOSSIBLE: case MAIL_ERROR_PARAMS: resp_code = IMAP_RESP_CODE_CANNOT;
--- a/src/lib-storage/mail-error.h Wed Mar 08 15:39:34 2017 -0500 +++ b/src/lib-storage/mail-error.h Mon Feb 27 18:13:54 2017 -0500 @@ -26,6 +26,8 @@ /* Temporary internal error */ MAIL_ERROR_TEMP, + /* Temporary failure because a subsystem is down */ + MAIL_ERROR_UNAVAILABLE, /* It's not possible to do the wanted operation */ MAIL_ERROR_NOTPOSSIBLE, /* Invalid parameters (eg. mailbox name not valid) */