aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-03-20 22:14:01 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-03-20 22:14:01 +0800
commitb2d8e71dfbb037e9454a49a59b97c1e965597e01 (patch)
tree23a7cf0c5acaea4224e83470ca42e972cecad159
parent74da1a106e22d58f90ee6077089bda6fb7a56cea (diff)
downloadgsoc2013-empathy-b2d8e71dfbb037e9454a49a59b97c1e965597e01.tar
gsoc2013-empathy-b2d8e71dfbb037e9454a49a59b97c1e965597e01.tar.gz
gsoc2013-empathy-b2d8e71dfbb037e9454a49a59b97c1e965597e01.tar.bz2
gsoc2013-empathy-b2d8e71dfbb037e9454a49a59b97c1e965597e01.tar.lz
gsoc2013-empathy-b2d8e71dfbb037e9454a49a59b97c1e965597e01.tar.xz
gsoc2013-empathy-b2d8e71dfbb037e9454a49a59b97c1e965597e01.tar.zst
gsoc2013-empathy-b2d8e71dfbb037e9454a49a59b97c1e965597e01.zip
Use tp_channel_get_identifier instead of inspecting channel's handle.
From: Xavier Claessens <xclaesse@gmail.com> svn path=/trunk/; revision=2725
-rw-r--r--libempathy/empathy-tp-chat.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 49870b41b..1329c61be 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -49,7 +49,6 @@ typedef struct {
EmpathyTpGroup *group;
McAccount *account;
TpChannel *channel;
- gchar *id;
gboolean listing_pending_messages;
/* Queue of messages not signalled yet */
GQueue *messages_queue;
@@ -843,20 +842,6 @@ tp_chat_channel_ready_cb (EmpathyTpChat *chat)
"handle_type", &handle_type,
NULL);
- if (handle_type != TP_HANDLE_TYPE_NONE && handle != 0) {
- GArray *handles;
- gchar **names;
-
- handles = g_array_new (FALSE, FALSE, sizeof (guint));
- g_array_append_val (handles, handle);
- tp_cli_connection_run_inspect_handles (connection, -1,
- handle_type, handles,
- &names, NULL, NULL);
- priv->id = *names;
- g_array_free (handles, TRUE);
- g_free (names);
- }
-
if (handle_type == TP_HANDLE_TYPE_CONTACT && handle != 0) {
priv->remote_contact = empathy_contact_factory_get_from_handle (priv->factory,
priv->account,
@@ -1016,8 +1001,6 @@ tp_chat_finalize (GObject *object)
g_ptr_array_free (priv->properties, TRUE);
}
-
- g_free (priv->id);
g_queue_free (priv->messages_queue);
g_queue_free (priv->pending_messages_queue);
@@ -1242,7 +1225,7 @@ empathy_tp_chat_get_id (EmpathyTpChat *chat)
g_return_val_if_fail (EMPATHY_IS_TP_CHAT (chat), NULL);
g_return_val_if_fail (priv->ready, NULL);
- return priv->id;
+ return tp_channel_get_identifier (priv->channel);
}
EmpathyContact *