soup-cache-input-stream: fixed a reference cycle
authorSergio Villar Senin <svillar@igalia.com>
Fri, 15 Feb 2013 20:40:28 +0000 (21:40 +0100)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 18 Feb 2013 10:03:15 +0000 (11:03 +0100)
commit89a3db7081798ffe0cab1a8c3a173a6c0a61297c
tree0dcbd531db74e54403635cfb804c80b5c51e3118
parentf8f7454fc4b561cb896e6234e69da0102906089d
soup-cache-input-stream: fixed a reference cycle

Fixed a reference cycle between SoupCacheInputStream and a
GTask. This reference cycle was preventing the input stream from
being freed when the SoupMessage was cancelled before the stream
was completely read. Furthermore the SoupCache was not able to
complete the pending request because the SoupCacheInputStream was
not aware of the message cancellation and remained waiting forever.

In order to remove the cycle
soup_cache_input_stream_cache(_finish) were removed and the
caching operation finalization is now reported via a signal.
SoupCacheInputStream also implements close_fn which properly
finalizes any pending caching operation.

https://bugzilla.gnome.org/show_bug.cgi?id=682527
libsoup/soup-cache-input-stream.c
libsoup/soup-cache-input-stream.h
libsoup/soup-cache.c