dovecot-2.1: imapc: If server doesn't support GUIDs, return empt...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jan 27 02:43:06 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/f3e000992f61
changeset: 14003:f3e000992f61
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jan 27 02:42:50 2012 +0200
description:
imapc: If server doesn't support GUIDs, return empty GUID rather than fail.
This is how other backends do it as well.

diffstat:

 src/lib-storage/index/imapc/imapc-mail.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r afeabe28a499 -r f3e000992f61 src/lib-storage/index/imapc/imapc-mail.c
--- a/src/lib-storage/index/imapc/imapc-mail.c	Thu Jan 26 21:43:27 2012 +0200
+++ b/src/lib-storage/index/imapc/imapc-mail.c	Fri Jan 27 02:42:50 2012 +0200
@@ -322,8 +322,14 @@
 imapc_mail_get_special(struct mail *_mail, enum mail_fetch_field field,
 		       const char **value_r)
 {
+	struct imapc_mailbox *mbox = (struct imapc_mailbox *)_mail->box;
+
 	switch (field) {
 	case MAIL_FETCH_GUID:
+		if (mbox->guid_fetch_field_name == NULL) {
+			/* GUIDs not supported by server */
+			break;
+		}
 		*value_r = "";
 		return imapc_mail_get_guid(_mail, value_r);
 	default:


More information about the dovecot-cvs mailing list