Changeset 3457
- Timestamp:
- 03/04/08 15:17:30
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/Makefile.am (modified) (2 diffs)
- trunk/libtinymail-camel/camel-lite/Makefile.am (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/bs (moved) (moved from trunk/libtinymail-camel/bs)
- trunk/libtinymail-camel/camel-lite/bs/.svnignore (copied) (copied from trunk/libtinymail-camel/bs/.svnignore)
- trunk/libtinymail-camel/camel-lite/bs/Makefile.am (copied) (copied from trunk/libtinymail-camel/bs/Makefile.am) (1 diff)
- trunk/libtinymail-camel/camel-lite/bs/bodystruct.c (copied) (copied from trunk/libtinymail-camel/bs/bodystruct.c) (1 diff)
- trunk/libtinymail-camel/camel-lite/bs/bodystruct.h (copied) (copied from trunk/libtinymail-camel/bs/bodystruct.h)
- trunk/libtinymail-camel/camel-lite/bs/envelope.h (copied) (copied from trunk/libtinymail-camel/bs/envelope.h)
- trunk/libtinymail-camel/camel-lite/camel/Makefile.am (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/configure.ac (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-mime-part.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3455 r3457 1 2008-03-04 Jose Dapena Paz <jdapena@igalia.com> 2 3 * libtinymail-camel/tny-camel-mime-part.c: 4 Now, when we get the parts of a mime part that's a message, 5 we check if any part has an attachment content disposition, 6 and update the attachments flag properly. 7 * Moved bodystructure parser to camel, so that we 8 can use it there. 9 * libtinymail-camel/camel-lite/bs/bodystruct.c: 10 Added missing if, to avoid fetching the header badly (and 11 causing coredumps) for bodystructure strings not 12 including BODYSTRUCTURE prefix. 13 1 14 2008-03-04 Philip Van Hoof <pvanhoof@gnome.org> 2 15 trunk/libtinymail-camel/Makefile.am
r3442 r3457 1 SUBDIRS = camel-lite bs.1 SUBDIRS = camel-lite . 2 2 3 3 INCLUDES = $(LIBTINYMAIL_CAMEL_CFLAGS) \ … … 102 102 $(LIBTINYMAIL_CAMEL_LIBS) \ 103 103 $(top_builddir)/libtinymail-camel/camel-lite/camel/libcamel-lite-1.2.la \ 104 $(top_builddir)/libtinymail/libtinymail-$(API_VERSION).la \ 105 $(top_builddir)/libtinymail-camel/bs/libbodystruct.la 104 $(top_builddir)/libtinymail/libtinymail-$(API_VERSION).la 106 105 107 106 libtinymail_camel_1_0_la_LDFLAGS = -export-dynamic -version-info \ trunk/libtinymail-camel/camel-lite/Makefile.am
r3232 r3457 1 SUBDIRS = summary libedataserver camel1 SUBDIRS = bs summary libedataserver camel 2 2 3 3 EXTRA_DIST = iconv-detect.h trunk/libtinymail-camel/camel-lite/bs/Makefile.am
r3456 r3457 1 INCLUDES = $(LIBTINYMAIL_CAMEL_CFLAGS) \ 2 -I. -I$(top_srcdir) \ 3 -I$(top_srcdir)/libtinymail \ 4 -I$(top_srcdir)/libtinymail-camel/camel-lite 1 INCLUDES = -I. \ 2 $(CAMEL_CFLAGS) 3 5 4 6 5 noinst_LTLIBRARIES = libbodystruct.la trunk/libtinymail-camel/camel-lite/bs/bodystruct.c
r3456 r3457 1117 1117 bodystruct_t *r = NULL; 1118 1118 1119 if (!start) 1119 if (!start) { 1120 1120 r = bodystruct_part_decode (&inbuf, inbuf + inlen, NULL, 1, err); 1121 1122 start += 13; 1123 lendif = (int) start - (int) inbuf; 1124 1125 r = bodystruct_part_decode (&start, (unsigned char *) ( start + (inlen - lendif) ), NULL, 1, err); 1121 } else { 1122 1123 start += 13; 1124 lendif = (int) start - (int) inbuf; 1125 1126 r = bodystruct_part_decode (&start, (unsigned char *) ( start + (inlen - lendif) ), NULL, 1, err); 1127 } 1126 1128 if (!r->part_spec) 1127 1129 r->part_spec = g_strdup ("1"); trunk/libtinymail-camel/camel-lite/camel/Makefile.am
r3443 r3457 289 289 $(SOCKET_LIBS) \ 290 290 $(REGEX_LIBS) \ 291 $(SSL_LIBS) 291 $(SSL_LIBS) \ 292 $(top_builddir)/bs/libbodystruct.la 292 293 293 294 camel-mime-tables.c: gentables.pl trunk/libtinymail-camel/camel-lite/configure.ac
r3232 r3457 222 222 AC_OUTPUT([ 223 223 Makefile 224 bs/Makefile 224 225 camel/Makefile 225 226 camel/providers/Makefile trunk/libtinymail-camel/tny-camel-mime-part.c
r3453 r3457 170 170 gboolean is_related = FALSE; 171 171 CamelContentType *content_type = NULL; 172 gboolean has_attachments = FALSE; 172 173 173 174 g_assert (TNY_IS_LIST (list)); … … 198 199 TnyMimePart *newpart=NULL; 199 200 CamelContentType *type; 201 const gchar *disposition; 200 202 201 203 if (!tpart || !CAMEL_IS_MIME_PART (tpart)) 202 204 continue; 205 206 disposition = camel_mime_part_get_disposition (tpart); 207 208 if (camel_strstrcase (disposition, "attachment") != NULL) 209 has_attachments = TRUE; 203 210 204 211 type = camel_mime_part_get_content_type (tpart); … … 242 249 tny_list_prepend (list, G_OBJECT (newpart)); 243 250 g_object_unref (G_OBJECT (newpart)); 251 } 252 } 253 254 if (TNY_IS_MSG (self)) { 255 TnyHeader *header; 256 257 header = tny_msg_get_header (TNY_MSG (self)); 258 if (header) { 259 if (has_attachments && 260 !(tny_header_get_flags (header) & TNY_HEADER_FLAG_ATTACHMENTS)) 261 tny_header_set_flag (header, TNY_HEADER_FLAG_ATTACHMENTS); 262 g_object_unref (header); 244 263 } 245 264 }
