[libsoup/cache: 10/13] soup-cache: keep msg alive until we have the data to reply



commit c4b622c04649daa83eda91a406fabce075c78740
Author: Xan Lopez <xan gnome org>
Date:   Wed Aug 5 10:50:00 2009 +0300

    soup-cache: keep msg alive until we have the data to reply

 libsoup/soup-cache.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c
index 1db130b..2ea2296 100644
--- a/libsoup/soup-cache.c
+++ b/libsoup/soup-cache.c
@@ -644,6 +644,7 @@ load_contents_ready_cb (GObject *source, GAsyncResult *result, SoupMessage *msg)
 	}
 
 	g_object_unref (file);
+	g_object_unref (msg);
 }
 
 void
@@ -677,6 +678,7 @@ soup_cache_send_response (SoupCache *cache, SoupMessage *msg)
 	if (entry->length) {
 		GFile *file;
 
+		g_object_ref (msg);
 		file = g_file_new_for_path (entry->filename);
 		g_file_load_contents_async (file, NULL,
 					    (GAsyncReadyCallback)load_contents_ready_cb,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]