isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit f4a192f375c47bc910f7b6216aa270855012d0a2
parent aee0fa3b68461fdc3208db8987752660810bddf3
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat, 25 Jan 2014 11:34:03 +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.

Diffstat:
Msrc/drv_imap.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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" );