aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-b64.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-stream-b64.c')
-rw-r--r--camel/camel-stream-b64.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/camel/camel-stream-b64.c b/camel/camel-stream-b64.c
index f43e89d982..f2155a2c95 100644
--- a/camel/camel-stream-b64.c
+++ b/camel/camel-stream-b64.c
@@ -80,6 +80,8 @@ static gint read__static (CamelStream *strea
gchar *buffer,
gint n);
+static void reset__static (CamelStream *stream);
+
static gint read_decode__static (CamelStream *stream,
gchar *buffer,
gint n);
@@ -98,8 +100,9 @@ camel_stream_b64_class_init (CamelStreamB64Class *camel_stream_b64_class)
/* virtual method overload */
- camel_stream_class->read = read__static;
- camel_stream_class->eos = eos__static;
+ camel_stream_class->read = read__static;
+ camel_stream_class->eos = eos__static;
+ camel_stream_class->reset = reset__static;
/* signal definition */
@@ -303,3 +306,21 @@ eos__static (CamelStream *stream)
return (stream_b64->eos || camel_stream_eos (stream_b64->input_stream));
}
+
+
+
+
+
+static void
+reset__static (CamelStream *stream)
+{
+ CamelStreamB64 *stream_b64 = CAMEL_STREAM_B64 (stream);
+
+ g_assert (stream);
+ g_assert (stream_b64->input_stream);
+
+ stream_b64->decode_status.keep = 0;
+ stream_b64->decode_status.state = 0;
+
+ camel_stream_reset (stream_b64->input_stream);
+}