diff options
author | Dan Winship <danw@src.gnome.org> | 2005-08-22 17:00:18 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2005-08-22 17:00:18 +0000 |
commit | a3a33b0e1c3af75f1a18e6563d24dfeaf9c3c7bd (patch) | |
tree | ee11d2b9e629e18485afb20d99afd4f2d2dcfaee | |
parent | 7a93fd18e8ae5f4d04db12a3b1d32117b063fc1d (diff) | |
download | libsoup-gnome-2-10.tar.gz |
Fix g_object_add/remove_weak_pointer usage to prevent a crash whengnome-2-10
* libsoup/soup-connection.c (set_current_request,
clear_current_request): Fix g_object_add/remove_weak_pointer usage
to prevent a crash when canceling a request. From Tambet.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libsoup/soup-connection.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2005-08-22 Dan Winship <danw@novell.com> + + * libsoup/soup-connection.c (set_current_request, + clear_current_request): Fix g_object_add/remove_weak_pointer usage + to prevent a crash when canceling a request. From Tambet. + 2005-08-18 Harish Krishnaswamy <kharish@novell.com> * libsoup/soup-socket.c (finalize) : fix for an error in diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index 88ede8aa..feae2b4b 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -312,7 +312,7 @@ set_current_request (SoupConnection *conn, SoupMessage *req) conn->priv->cur_req = req; conn->priv->in_use = TRUE; g_object_add_weak_pointer (G_OBJECT (req), - (gpointer *)conn->priv->cur_req); + (gpointer *)&conn->priv->cur_req); } static void @@ -325,7 +325,7 @@ clear_current_request (SoupConnection *conn) conn->priv->last_used = time (NULL); g_object_remove_weak_pointer (G_OBJECT (conn->priv->cur_req), - (gpointer *)conn->priv->cur_req); + (gpointer *)&conn->priv->cur_req); conn->priv->cur_req = NULL; } conn->priv->in_use = FALSE; |