Bug 568741 – g_buffered_input_stream_fill_async doesn't work

2009-01-22  Ryan Lortie  <desrt@desrt.ca>

        Bug 568741 – g_buffered_input_stream_fill_async doesn't work

        * gbufferedinputstream.c (fill_async_callback): grow the buffer tail
        after we have successfully read data from the base stream


svn path=/trunk/; revision=7827
This commit is contained in:
Ryan Lortie 2009-01-22 19:00:05 +00:00 committed by Ryan Lortie
parent 98d2cdd9e6
commit fb50c2ae1a
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2009-01-22 Ryan Lortie <desrt@desrt.ca>
Bug 568741 g_buffered_input_stream_fill_async doesn't work
* gbufferedinputstream.c (fill_async_callback): grow the buffer tail
after we have successfully read data from the base stream
2009-01-20 Ryan Lortie <desrt@desrt.ca>
Bug 568394 dropping the last reference to a stream filter closes the

View File

@ -931,6 +931,19 @@ fill_async_callback (GObject *source_object,
g_simple_async_result_set_from_error (simple, error);
g_error_free (error);
}
else
{
GBufferedInputStreamPrivate *priv;
GObject *object;
object = g_async_result_get_source_object (G_ASYNC_RESULT (simple));
priv = G_BUFFERED_INPUT_STREAM (object)->priv;
g_assert_cmpint (priv->end + res, <=, priv->len);
priv->end += res;
g_object_unref (object);
}
/* Complete immediately, not in idle, since we're already in a mainloop callout */
g_simple_async_result_complete (simple);