[evolution-data-server] Add support for * VANISHED (EARLIER) [uidset...]



commit de786c4147333489ac1dfb25b378acf96541919c
Author: David Woodhouse <David Woodhouse intel com>
Date:   Wed Jun 30 09:39:22 2010 +0100

    Add support for * VANISHED (EARLIER) [uidset...]
    
    (Actually just throw away anything in the parentheses).
    
    We'll need this for QRESYNC SELECT

 camel/providers/imapx/camel-imapx-server.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index d35d7c9..e609313 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1230,9 +1230,26 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
 		break;
 	}
 	case IMAPX_VANISHED: {
-		GPtrArray *uids = imapx_parse_uids(imap->stream, ex);
+		GPtrArray *uids;
 		int i;
+		guint len;
+		guchar *token;
+		gint tok;
+
+		tok = camel_imapx_stream_token (imap->stream, &token, &len, ex);
+		if (camel_exception_is_set(ex))
+			return -1;
+		if (tok == '(') {
+			while (tok != ')') {
+				/* We expect this to be 'EARLIER' */
+				tok = camel_imapx_stream_token(imap->stream, &token, &len, ex);
+				if (camel_exception_is_set(ex))
+					return -1;
+			}
+		} else
+			camel_imapx_stream_ungettoken(imap->stream, tok, token, len);
 
+		uids = imapx_parse_uids(imap->stream, ex);
 		if (camel_exception_is_set(ex))
 			return -1;
 		for (i = 0; i < uids->len; i++) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]