lock host_lock around this, since it can be called from set_property().
authorDan Winship <danw@src.gnome.org>
Tue, 7 Jun 2005 14:18:07 +0000 (14:18 +0000)
committerDan Winship <danw@src.gnome.org>
Tue, 7 Jun 2005 14:18:07 +0000 (14:18 +0000)
        * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
        this, since it can be called from set_property(). Possible fix for
        bnc #81641.

ChangeLog
libsoup/soup-session.c

index 1c7e473..7344a40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-26  Dan Winship  <danw@novell.com>
+
+       * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
+       this, since it can be called from set_property(). Possible fix for
+       bnc #81641.
+
 2005-05-05  Dan Winship  <danw@novell.com>
 
        * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
index a082096..c1d8235 100644 (file)
@@ -128,7 +128,9 @@ foreach_free_host (gpointer key, gpointer host, gpointer data)
 static void
 cleanup_hosts (SoupSessionPrivate *priv)
 {
+       g_mutex_lock (priv->host_lock);
        g_hash_table_foreach_remove (priv->hosts, foreach_free_host, NULL);
+       g_mutex_unlock (priv->host_lock);
 }
 
 static void