Author: danw
Date: Sun Jan 27 16:52:35 2008
New Revision: 1053
URL: http://svn.gnome.org/viewvc/libsoup?rev=1053&view=rev
Log:
* libsoup/soup-session-async.c (final_finished): Don't run the
queue again if the callback destroyed the session. #511868, Stef
Walter.
Modified:
trunk/ChangeLog
trunk/libsoup/soup-session-async.c
Modified: trunk/libsoup/soup-session-async.c
==============================================================================
--- trunk/libsoup/soup-session-async.c (original)
+++ trunk/libsoup/soup-session-async.c Sun Jan 27 16:52:35 2008
@@ -196,18 +196,24 @@
SoupSessionAsyncQueueData *saqd = user_data;
SoupSessionAsync *sa = saqd->sa;
+ g_object_add_weak_pointer (G_OBJECT (sa), (gpointer)&sa);
+
if (!SOUP_MESSAGE_IS_STARTING (req)) {
g_signal_handlers_disconnect_by_func (req, final_finished,
saqd);
if (saqd->callback) {
saqd->callback ((SoupSession *)sa, req,
saqd->callback_data);
+ /* callback might destroy sa */
}
g_object_unref (req);
g_slice_free (SoupSessionAsyncQueueData, saqd);
}
- run_queue (sa, FALSE);
+ if (sa) {
+ g_object_remove_weak_pointer (G_OBJECT (sa), (gpointer)&sa);
+ run_queue (sa, FALSE);
+ }
}
static gboolean
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list
Want to limit the commits to a few modules? Go to above URL, log in to edit
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development
mailing list. Email [EMAIL PROTECTED] if interested.