[libsoup/cache] soup-cache: balance references for the SoupCacheEntry stream
- From: Xan Lopez <xan src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsoup/cache] soup-cache: balance references for the SoupCacheEntry stream
- Date: Thu, 6 Aug 2009 08:03:08 +0000 (UTC)
commit ad0e70d0c4bde513810297bf6961d4a64efe2d1f
Author: Xan Lopez <xan gnome org>
Date: Thu Aug 6 10:59:02 2009 +0300
soup-cache: balance references for the SoupCacheEntry stream
Add the missing reference to it when it's opened for writing, which
balances the unref we do on the close callback. This guarantees the
stream will be kept open while we receive the data from the net.
libsoup/soup-cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c
index ce554d4..d7275fd 100644
--- a/libsoup/soup-cache.c
+++ b/libsoup/soup-cache.c
@@ -536,7 +536,7 @@ append_to_ready_cb (GObject *source, GAsyncResult *result, SoupCacheWritingFixtu
return;
}
- entry->stream = stream;
+ entry->stream = g_object_ref (stream);
g_object_unref (file);
/* If we already got all the data we have to initiate the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]