From 5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 17 Jul 2000 21:42:49 +0000 Subject: Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and 2000-07-17 Jeffrey Stedfast * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and any other servers that send back a UID at the end of each FETCH inside of the main body of the message part). svn path=/trunk/; revision=4194 --- camel/ChangeLog | 7 +++++++ camel/providers/imap/camel-imap-folder.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 74a39717e6..7134fdd81e 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2000-07-17 Jeffrey Stedfast + + * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get + IMAP code to work with CommunigatePro and MS Exchange (and any other + servers that send back a UID at the end of each FETCH inside of the main + body of the message part). + 2000-07-16 Jeffrey Stedfast * providers/imap/camel-imap-store.c: All SELECT calls now pass diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 80ac5f1537..fb1d1ae7b0 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -855,10 +855,10 @@ imap_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex) if (*q == '\n') part_len--; } - /* we want to make sure we get up to the last \n */ - for ( ; *q && *q != '\n'; q++, part_len++); + /* FIXME: This is a hack for IMAP daemons that send us a UID at the end of each FETCH */ + for (q--, part_len--; q > p && *(q-1) != '\n'; q--, part_len--); - header = g_strndup (p, part_len); + header = g_strndup (p, part_len + 1); g_free (result); d(fprintf (stderr, "*** We got the header ***\n")); @@ -899,10 +899,10 @@ imap_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex) if (*q == '\n') part_len--; } - /* we want to make sure we get up to the last \n */ - for ( ; *q && *q != '\n'; q++, part_len++); + /* FIXME: This is a hack for IMAP daemons that send us a UID at the end of each FETCH */ + for ( ; q > p && *(q-1) != '\n'; q--, part_len--); - body = g_strndup (p, part_len); + body = g_strndup (p, part_len + 1); g_free (result); d(fprintf (stderr, "*** We got the body ***\n")); -- cgit