diff options
author | Mike Ruprecht <mike.ruprecht@collabora.co.uk> | 2009-10-15 05:23:43 +0800 |
---|---|---|
committer | Mike Ruprecht <mike.ruprecht@collabora.co.uk> | 2009-10-15 05:23:43 +0800 |
commit | eeafe98a27dbccc08a6023b7c73f7bd537c5e39c (patch) | |
tree | 0118ec1a7520e87c9d1e01c64b1d010bc41e1f02 /libempathy | |
parent | 1e0632dcffc06127e9919fcd4dfa3571108ff0de (diff) | |
download | gsoc2013-empathy-eeafe98a27dbccc08a6023b7c73f7bd537c5e39c.tar gsoc2013-empathy-eeafe98a27dbccc08a6023b7c73f7bd537c5e39c.tar.gz gsoc2013-empathy-eeafe98a27dbccc08a6023b7c73f7bd537c5e39c.tar.bz2 gsoc2013-empathy-eeafe98a27dbccc08a6023b7c73f7bd537c5e39c.tar.lz gsoc2013-empathy-eeafe98a27dbccc08a6023b7c73f7bd537c5e39c.tar.xz gsoc2013-empathy-eeafe98a27dbccc08a6023b7c73f7bd537c5e39c.tar.zst gsoc2013-empathy-eeafe98a27dbccc08a6023b7c73f7bd537c5e39c.zip |
Remove the weak_object parameter when requesting channels.
Use the EmpathyDispatcher pointed to in the DispatcherRequestData instead of
the weak_object. Outstanding channel requests were being cancelled in the
EmpathyDispatcher's finalize method. This had the potential to double-cancel
the requests when the weak_object (EmpathyDispatcher) was unreffed, causing a
segmentation fault.
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-dispatcher.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 2655764f8..55f2e7579 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -1294,8 +1294,9 @@ dispatcher_request_channel_cb (TpConnection *connection, gpointer user_data, GObject *weak_object) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (weak_object); DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; + EmpathyDispatcher *dispatcher = + EMPATHY_DISPATCHER (request_data->dispatcher); dispatcher_connection_new_requested_channel (dispatcher, request_data, object_path, NULL, error); @@ -1331,7 +1332,7 @@ dispatcher_request_channel (DispatcherRequestData *request_data) request_data->handle_type, request_data->handle, TRUE, dispatcher_request_channel_cb, - request_data, NULL, G_OBJECT (request_data->dispatcher)); + request_data, NULL, NULL); } } @@ -1488,8 +1489,7 @@ empathy_dispatcher_join_muc (TpConnection *connection, request_data->pending_call = tp_cli_connection_call_request_handles ( connection, -1, TP_HANDLE_TYPE_ROOM, names, - dispatcher_request_handles_cb, request_data, NULL, - G_OBJECT (dispatcher)); + dispatcher_request_handles_cb, request_data, NULL, NULL); g_object_unref (dispatcher); } @@ -1502,8 +1502,9 @@ dispatcher_create_channel_cb (TpConnection *connect, gpointer user_data, GObject *weak_object) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (weak_object); DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; + EmpathyDispatcher *dispatcher = + EMPATHY_DISPATCHER (request_data->dispatcher); dispatcher_connection_new_requested_channel (dispatcher, request_data, object_path, properties, error); @@ -1518,8 +1519,9 @@ dispatcher_ensure_channel_cb (TpConnection *connect, gpointer user_data, GObject *weak_object) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (weak_object); DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; + EmpathyDispatcher *dispatcher = + EMPATHY_DISPATCHER (request_data->dispatcher); dispatcher_connection_new_requested_channel (dispatcher, request_data, object_path, properties, error); @@ -1536,7 +1538,7 @@ empathy_dispatcher_call_create_or_ensure_channel ( tp_cli_connection_interface_requests_call_ensure_channel ( request_data->connection, -1, request_data->request, dispatcher_ensure_channel_cb, - request_data, NULL, G_OBJECT (request_data->dispatcher)); + request_data, NULL, NULL); } else { @@ -1544,7 +1546,7 @@ empathy_dispatcher_call_create_or_ensure_channel ( tp_cli_connection_interface_requests_call_create_channel ( request_data->connection, -1, request_data->request, dispatcher_create_channel_cb, - request_data, NULL, G_OBJECT (request_data->dispatcher)); + request_data, NULL, NULL); } } |