Commit 62affd25 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos
Browse files

filter-input-stream: check cancellable on read and skip

When reading from the base stream the cancellable is always checked, but
not when reading from the internal buffer.
parent 4a65b629
......@@ -91,6 +91,9 @@ soup_filter_input_stream_read_fn (GInputStream *stream,
SoupFilterInputStreamPrivate *priv = soup_filter_input_stream_get_instance_private (fstream);
gssize bytes_read;
if (g_cancellable_set_error_if_cancelled (cancellable, error))
return -1;
if (!priv->in_read_until)
priv->need_more = FALSE;
......@@ -116,6 +119,9 @@ soup_filter_input_stream_skip (GInputStream *stream,
SoupFilterInputStreamPrivate *priv = soup_filter_input_stream_get_instance_private (fstream);
gssize bytes_skipped;
if (g_cancellable_set_error_if_cancelled (cancellable, error))
return -1;
if (!priv->in_read_until)
priv->need_more = FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment