aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-07-12 10:22:23 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-07-12 10:22:23 +0800
commit05e4067b622c3548db76c04c4dfbf0ef340800e7 (patch)
tree10c341daf2664adddd6982b7714b628bf9bb17f4 /camel
parent405cdd1ea2729f05512a3d9052a5683c34f556b1 (diff)
downloadgsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar
gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.gz
gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.bz2
gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.lz
gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.xz
gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.zst
gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.zip
Removed some code i wasn't supposed to commit.
2001-07-12 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_message): Removed some code i wasn't supposed to commit. * providers/local/camel-local-summary.c (local_summary_add): Only set info->size if it is not zero. (local_summary_add): If we dont get a size from the info passed in, calculate it using a null stream write. Should do #4392. svn path=/trunk/; revision=11025
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog11
-rw-r--r--camel/camel-folder-summary.c5
-rw-r--r--camel/providers/local/camel-local-summary.c16
3 files changed, 25 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b7914e1745..38d2d8d142 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,14 @@
+2001-07-12 Not Zed <NotZed@Ximian.com>
+
+ * camel-folder-summary.c
+ (camel_folder_summary_info_new_from_message): Removed some code i
+ wasn't supposed to commit.
+
+ * providers/local/camel-local-summary.c (local_summary_add): Only
+ set info->size if it is not zero.
+ (local_summary_add): If we dont get a size from the info passed
+ in, calculate it using a null stream write. Should do #4392.
+
2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-part-utils.c (extract_metatag_charset): New function
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 2e2d66d062..120d927766 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -870,7 +870,6 @@ CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary
{
CamelMessageInfo *info;
struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
- CamelStreamNull *sn;
info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new_from_message(s, msg);
@@ -884,10 +883,6 @@ CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary
}
info->content = summary_build_content_info_message(s, info, (CamelMimePart *)msg);
-#if 0
- sn = camel_stream_null_new();
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, sn);
-#endif
return info;
}
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index a1f1c1334b..c925e6e36a 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -33,7 +33,8 @@
#include <stdlib.h>
#include "camel-local-summary.h"
-#include <camel/camel-mime-message.h>
+#include "camel/camel-mime-message.h"
+#include "camel/camel-stream-null.h"
#define io(x)
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
@@ -393,8 +394,19 @@ local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMess
}
mi->flags = mi->flags | (info->flags & 0xffff);
- mi->size = info->size;
+ if (info->size)
+ mi->size = info->size;
}
+
+ /* we need to calculate the size ourselves */
+ if (mi->size == 0) {
+ CamelStreamNull *sn = (CamelStreamNull *)camel_stream_null_new();
+
+ camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, (CamelStream *)sn);
+ mi->size = sn->written;
+ camel_object_unref((CamelObject *)sn);
+ }
+
mi->flags &= ~(CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED);
xev = camel_local_summary_encode_x_evolution(cls, mi);
camel_medium_set_header((CamelMedium *)msg, "X-Evolution", xev);