From 17127fbee9fd1b0baecb4e305c005d6abbf8d880 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 5 Jul 2011 08:16:13 -0400 Subject: 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. --- modules/mail/e-mail-attachment-handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/mail/e-mail-attachment-handler.c') diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c index e65e6871c2..e6493f2f77 100644 --- a/modules/mail/e-mail-attachment-handler.c +++ b/modules/mail/e-mail-attachment-handler.c @@ -221,7 +221,7 @@ mail_attachment_handler_message_rfc822 (EAttachmentView *view, stream = camel_stream_mem_new (); camel_stream_write (stream, data, length, NULL, NULL); - camel_stream_reset (stream, NULL); + g_seekable_seek (G_SEEKABLE (stream), 0, G_SEEK_SET, NULL, NULL); message = camel_mime_message_new (); wrapper = CAMEL_DATA_WRAPPER (message); -- cgit v1.2.3