aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-06 12:56:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-06 12:56:49 +0800
commit91397eddfb7cb59e47fa08fceb7bc1a210f842ea (patch)
tree25c26b54303dee34a6e680d215a4f5406f1b4266
parenta4e1613aae063dd4bd4088d6d14ddd3fe570e73b (diff)
downloadgsoc2013-evolution-91397eddfb7cb59e47fa08fceb7bc1a210f842ea.tar.gz
gsoc2013-evolution-91397eddfb7cb59e47fa08fceb7bc1a210f842ea.tar.zst
gsoc2013-evolution-91397eddfb7cb59e47fa08fceb7bc1a210f842ea.zip
Changed over to camel_imap_command_extended as that was the source of the
2000-07-06 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_append_message): Changed over to camel_imap_command_extended as that was the source of the problems - apparently appending replies with more than just 1 line. svn path=/trunk/; revision=3908
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-folder.c18
2 files changed, 14 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 227dbbe5dc..7ece9b58fd 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * providers/imap/camel-imap-folder.c (imap_append_message): Changed
+ over to camel_imap_command_extended as that was the source of the
+ problems - apparently appending replies with more than just 1 line.
+
2000-07-05 Dan Winship <danw@helixcode.com>
* camel-folder-search.c (search_header_contains): make header
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 6b1a796738..0b997225b9 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -456,7 +456,7 @@ imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
g_return_if_fail (message != NULL);
/* write the message to a CamelStreamMem so we can get it's size */
- mem = CAMEL_STREAM_MEM (camel_stream_mem_new());
+ mem = CAMEL_STREAM_MEM (camel_stream_mem_new ());
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), CAMEL_STREAM (mem)) == -1) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -467,20 +467,18 @@ imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
return;
}
- mem->buffer = g_byte_array_append (mem->buffer, g_strdup("\r\n"), 3);
+ mem->buffer = g_byte_array_append (mem->buffer, g_strdup ("\r\n"), 3);
- if (url && url->path && *(url->path + 1) && strcmp(folder->full_name, "INBOX"))
- folder_path = g_strdup_printf ("%s/%s", url->path, folder->full_name);
+ if (url && url->path && *(url->path + 1) && strcmp (folder->full_name, "INBOX"))
+ folder_path = g_strdup_printf ("%s/%s", url->path + 1, folder->full_name);
else
folder_path = g_strdup (folder->full_name);
/* FIXME: len isn't really correct I don't think, we need to filter and possibly other things */
- status = camel_imap_command (CAMEL_IMAP_STORE (folder->parent_store),
- folder, &result,
- "APPEND %s (\\Seen) {%d}\r\n%s",
- folder_path,
- mem->buffer->len,
- mem->buffer->data);
+ status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store),
+ folder, &result,
+ "APPEND %s (\\Seen) {%d}\r\n%s",
+ folder_path, mem->buffer->len - 1, mem->buffer->data);
if (status != CAMEL_IMAP_OK) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);