aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/em-inline-filter.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-05 20:16:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-07-05 23:31:01 +0800
commit17127fbee9fd1b0baecb4e305c005d6abbf8d880 (patch)
tree37d0b9ecc37a6685125b2d30567e5b420dacfc59 /em-format/em-inline-filter.c
parenta51ea9b9770660531d1d48da4c230e0af118f297 (diff)
downloadgsoc2013-evolution-17127fbee9fd1b0baecb4e305c005d6abbf8d880.tar
gsoc2013-evolution-17127fbee9fd1b0baecb4e305c005d6abbf8d880.tar.gz
gsoc2013-evolution-17127fbee9fd1b0baecb4e305c005d6abbf8d880.tar.bz2
gsoc2013-evolution-17127fbee9fd1b0baecb4e305c005d6abbf8d880.tar.lz
gsoc2013-evolution-17127fbee9fd1b0baecb4e305c005d6abbf8d880.tar.xz
gsoc2013-evolution-17127fbee9fd1b0baecb4e305c005d6abbf8d880.tar.zst
gsoc2013-evolution-17127fbee9fd1b0baecb4e305c005d6abbf8d880.zip
Prefer g_seekable_seek() over camel_stream_reset().
When a stream is obviously a file or memory stream (both of which implement the GSeekable interface), use g_seekable_seek() instead of camel_stream_reset(). This is helping me discover if it's safe to remove camel_stream_reset(). We want to eventually move to GIO streams, which have no reset method.
Diffstat (limited to 'em-format/em-inline-filter.c')
-rw-r--r--em-format/em-inline-filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/em-format/em-inline-filter.c b/em-format/em-inline-filter.c
index c7a8014f6b..1f9639540e 100644
--- a/em-format/em-inline-filter.c
+++ b/em-format/em-inline-filter.c
@@ -121,7 +121,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len)
}
emif->data = g_byte_array_new ();
- camel_stream_reset (mem, NULL);
+ g_seekable_seek (G_SEEKABLE (mem), 0, G_SEEK_SET, NULL, NULL);
dw = camel_data_wrapper_new ();
if (encoding == emif->base_encoding && (encoding == CAMEL_TRANSFER_ENCODING_BASE64 || encoding == CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE)) {