commit f4a192f375c47bc910f7b6216aa270855012d0a2
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sat Jan 25 11:34:03 2014 +0100

    don't error out if we don't get an X-TUID header
    
    the BODY[] item in the FETCH response corresponds to what we requested,
    and its presence doesn't imply that it actually contains anything useful
    - new messages may appear in the mailbox in addition to those we stored
    ourselves, and these will obviously have no TUID.

 src/drv_imap.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index 5a28392..6007e54 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -922,9 +922,10 @@ parse_fetch_rsp( imap_store_t *ctx, list_t *list, char *s 
ATTR_UNUSED )
                                        if (!is_atom( tmp ) || strcmp( 
tmp->val, "]" ))
                                                goto bfail;
                                        tmp = tmp->next;
-                                       if (!is_atom( tmp ) || memcmp( 
tmp->val, "X-TUID: ", 8 ))
+                                       if (!is_atom( tmp ))
                                                goto bfail;
-                                       tuid = tmp->val + 8;
+                                       if (!memcmp( tmp->val, "X-TUID: ", 8 ))
+                                               tuid = tmp->val + 8;
                                } else {
                                  bfail:
                                        error( "IMAP error: unable to parse 
BODY[HEADER.FIELDS ...]\n" );

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to