diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-01-10 00:15:27 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-10 00:15:27 +0800 |
commit | eba71b838f543c7dd9390e74911526cf3d48fa26 (patch) | |
tree | 45def98b25cf84c2defd71c79bdb6c00d8137cb5 /libempathy | |
parent | 0e114008b2603eb4dcceb180d5da896eb19be97d (diff) | |
download | gsoc2013-empathy-eba71b838f543c7dd9390e74911526cf3d48fa26.tar gsoc2013-empathy-eba71b838f543c7dd9390e74911526cf3d48fa26.tar.gz gsoc2013-empathy-eba71b838f543c7dd9390e74911526cf3d48fa26.tar.bz2 gsoc2013-empathy-eba71b838f543c7dd9390e74911526cf3d48fa26.tar.lz gsoc2013-empathy-eba71b838f543c7dd9390e74911526cf3d48fa26.tar.xz gsoc2013-empathy-eba71b838f543c7dd9390e74911526cf3d48fa26.tar.zst gsoc2013-empathy-eba71b838f543c7dd9390e74911526cf3d48fa26.zip |
Make the dispatch operation _get_ functions not return a ref
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
svn path=/trunk/; revision=2188
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-chatroom-manager.c | 6 | ||||
-rw-r--r-- | libempathy/empathy-dispatch-operation.c | 5 | ||||
-rw-r--r-- | libempathy/empathy-dispatcher.c | 4 | ||||
-rw-r--r-- | libempathy/empathy-tp-chat.c | 3 | ||||
-rw-r--r-- | libempathy/empathy-utils.c | 2 |
5 files changed, 6 insertions, 14 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index 282d7ed71..0a637a440 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -701,7 +701,7 @@ chatroom_manager_observe_channel_cb (EmpathyDispatcher *dispatcher, tp_channel_get_handle (channel, &handle_type); if (handle_type != TP_HANDLE_TYPE_ROOM) - goto out; + return; chat = EMPATHY_TP_CHAT ( empathy_dispatch_operation_get_channel_wrapper (operation)); @@ -724,10 +724,6 @@ chatroom_manager_observe_channel_cb (EmpathyDispatcher *dispatcher, g_signal_connect (chat, "destroy", G_CALLBACK (chatroom_manager_chat_destroyed_cb), manager); - - g_object_unref (chat); -out: - g_object_unref (channel); } void diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c index c623dbfd2..def9e43e1 100644 --- a/libempathy/empathy-dispatch-operation.c +++ b/libempathy/empathy-dispatch-operation.c @@ -526,7 +526,7 @@ empathy_dispatch_operation_get_channel (EmpathyDispatchOperation *operation) priv = GET_PRIV (operation); - return TP_CHANNEL (g_object_ref (priv->channel)); + return priv->channel; } GObject * @@ -539,9 +539,6 @@ empathy_dispatch_operation_get_channel_wrapper ( priv = GET_PRIV (operation); - if (priv->channel_wrapper != NULL) - g_object_ref (priv->channel_wrapper); - return priv->channel_wrapper; } diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 0d67336c7..bde8b6a1a 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -118,8 +118,8 @@ static DispatchData * new_dispatch_data (TpChannel *channel, GObject *channel_wrapper) { DispatchData *d = g_slice_new0 (DispatchData); - d->channel = channel; - d->channel_wrapper = channel_wrapper; + d->channel = g_object_ref (channel); + d->channel_wrapper = g_object_ref (channel_wrapper); return d; } diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 57e3277eb..bfcdd1a4c 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -1053,7 +1053,7 @@ tp_chat_set_property (GObject *object, switch (param_id) { case PROP_CHANNEL: - priv->channel = g_object_ref (g_value_get_object (value)); + priv->channel = g_value_dup_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); @@ -1187,6 +1187,7 @@ empathy_tp_chat_close (EmpathyTpChat *chat) { We loose the ordering of sent messages though */ g_signal_handlers_disconnect_by_func (priv->channel, tp_chat_invalidated_cb, chat); + tp_cli_channel_call_close (priv->channel, -1, tp_chat_async_cb, "closing channel", NULL, NULL); diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 754526608..4fc12085a 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -470,8 +470,6 @@ empathy_call_request_cb (EmpathyDispatchOperation *operation, empathy_dispatch_operation_get_channel_wrapper (operation)); empathy_tp_call_to (call, contact); - - g_object_unref (call); } g_object_unref (contact); |