[evolution-data-server] Bug 780617 - [IMAPx] Allow FETCH response split into multiple lines



commit c058f294bdf7f7f62dff1e40a0ea8ea3e1b726b4
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 28 08:52:25 2017 +0200

    Bug 780617 - [IMAPx] Allow FETCH response split into multiple lines

 src/camel/providers/imapx/camel-imapx-utils.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-utils.c b/src/camel/providers/imapx/camel-imapx-utils.c
index 84d6627..962336d 100644
--- a/src/camel/providers/imapx/camel-imapx-utils.c
+++ b/src/camel/providers/imapx/camel-imapx-utils.c
@@ -2106,6 +2106,10 @@ imapx_parse_fetch (CamelIMAPXInputStream *stream,
 
                tok = camel_imapx_input_stream_token (
                        stream, &token, &len, cancellable, error);
+               if (tok == '\n') {
+                       tok = camel_imapx_input_stream_token (
+                               stream, &token, &len, cancellable, error);
+               }
        }
 
        if (tok == IMAPX_TOK_ERROR)
@@ -2114,7 +2118,7 @@ imapx_parse_fetch (CamelIMAPXInputStream *stream,
        if (tok != ')') {
                g_set_error (
                        error, CAMEL_IMAPX_ERROR, CAMEL_IMAPX_ERROR_SERVER_RESPONSE_MALFORMED,
-                       "missing closing ')' on fetch response");
+                       "missing closing ')' on fetch response (got 0x%x)", tok);
                goto fail;
        }
 


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