aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-18 05:42:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-18 05:42:49 +0800
commit5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6 (patch)
tree61cd1591204e145669a2061ef976b402ec8122a6
parent93a02f6bf8a34dd6d62b0a4513fb66b2399fc65c (diff)
downloadgsoc2013-evolution-5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6.tar
gsoc2013-evolution-5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6.tar.gz
gsoc2013-evolution-5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6.tar.bz2
gsoc2013-evolution-5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6.tar.lz
gsoc2013-evolution-5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6.tar.xz
gsoc2013-evolution-5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6.tar.zst
gsoc2013-evolution-5e5e5082d89b7eb7f3fd76c8aa3b07e3587070a6.zip
Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and
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). svn path=/trunk/; revision=4194
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/providers/imap/camel-imap-folder.c12
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"));