dovecot-2.2: pop3c: If POP3 server doesn't support UIDLs, don't ...

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 19 04:18:45 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/5eed62d890f7
changeset: 17068:5eed62d890f7
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Dec 19 04:18:30 2013 +0200
description:
pop3c: If POP3 server doesn't support UIDLs, don't advertise GUID support.

diffstat:

 src/lib-storage/index/pop3c/pop3c-storage.c |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 970ffc20b8a0 -r 5eed62d890f7 src/lib-storage/index/pop3c/pop3c-storage.c
--- a/src/lib-storage/index/pop3c/pop3c-storage.c	Thu Dec 19 04:05:52 2013 +0200
+++ b/src/lib-storage/index/pop3c/pop3c-storage.c	Thu Dec 19 04:18:30 2013 +0200
@@ -213,6 +213,21 @@
 	return index_storage_mailbox_update(box, update);
 }
 
+static int pop3c_mailbox_get_status(struct mailbox *box,
+				    enum mailbox_status_items items,
+				    struct mailbox_status *status_r)
+{
+	struct pop3c_mailbox *mbox = (struct pop3c_mailbox *)box;
+
+	if (index_storage_get_status(box, items, status_r) < 0)
+		return -1;
+
+	if ((pop3c_client_get_capabilities(mbox->client) &
+	     POP3C_CAPABILITY_UIDL) == 0)
+		status_r->have_guids = FALSE;
+	return 0;
+}
+
 static int pop3c_mailbox_get_metadata(struct mailbox *box,
 				      enum mailbox_metadata_items items,
 				      struct mailbox_metadata *metadata_r)
@@ -308,7 +323,7 @@
 		pop3c_mailbox_update,
 		index_storage_mailbox_delete,
 		index_storage_mailbox_rename,
-		index_storage_get_status,
+		pop3c_mailbox_get_status,
 		pop3c_mailbox_get_metadata,
 		index_storage_set_subscribed,
 		index_storage_attribute_set,


More information about the dovecot-cvs mailing list