diff options
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | 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 <fejj@helixcode.com> + + * 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 <fejj@helixcode.com> * 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")); |