dovecot-2.2: lib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 8 15:47:27 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/72d6f1f235d2
changeset: 19133:72d6f1f235d2
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 08 18:45:28 2015 +0300
description:
lib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_attribute_*set() fails for read-only attribute.
MAIL_ERROR_PARAMS indicates that there was something wrong with the
parameters itself. But the caller can't know (at least with current APIs)
if it's a read-only attribute it's trying to change before actually doing it.

diffstat:

 src/lib-storage/mailbox-attribute.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r e027fa256c55 -r 72d6f1f235d2 src/lib-storage/mailbox-attribute.c
--- a/src/lib-storage/mailbox-attribute.c	Tue Sep 08 13:41:21 2015 +0300
+++ b/src/lib-storage/mailbox-attribute.c	Tue Sep 08 18:45:28 2015 +0300
@@ -172,7 +172,7 @@
 			break;
 		case MAIL_ATTRIBUTE_INTERNAL_RANK_AUTHORITY:
 			if (iattr->set == NULL) {
-				mail_storage_set_error(t->box->storage, MAIL_ERROR_PARAMS, t_strdup_printf(
+				mail_storage_set_error(t->box->storage, MAIL_ERROR_NOTPOSSIBLE, t_strdup_printf(
 					"The /%s/%s attribute cannot be changed",
 					(type == MAIL_ATTRIBUTE_TYPE_SHARED ? "shared" : "private"), key));
 				return -1;


More information about the dovecot-cvs mailing list