[empathy] new_channels_cb: don't early return if TargetHandleType != TP_HANDLE_TYPE_LIST
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] new_channels_cb: don't early return if TargetHandleType != TP_HANDLE_TYPE_LIST
- Date: Thu, 8 Apr 2010 10:35:16 +0000 (UTC)
commit 8a83a0fed90f5ad0061e1cf7aae573139f314206
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Mar 30 14:48:30 2010 +0200
new_channels_cb: don't early return if TargetHandleType != TP_HANDLE_TYPE_LIST
libempathy/empathy-tp-contact-list.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index 3989213..cce5f8e 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -863,8 +863,8 @@ new_channels_cb (TpConnection *conn,
GValueArray *arr = g_ptr_array_index (channels, i);
const gchar *path;
GHashTable *properties;
- const gchar *id;
TpChannel *channel;
+ TpHandleType handle_type;
path = g_value_get_boxed (g_value_array_get_nth (arr, 0));
properties = g_value_get_boxed (g_value_array_get_nth (arr, 1));
@@ -874,20 +874,18 @@ new_channels_cb (TpConnection *conn,
TP_IFACE_CHANNEL_TYPE_CONTACT_LIST))
return;
- if (tp_asv_get_uint32 (properties,
- TP_IFACE_CHANNEL ".TargetHandleType", NULL)
- != TP_HANDLE_TYPE_LIST)
+ if (tp_asv_get_string (properties, TP_IFACE_CHANNEL ".TargetID") == NULL)
return;
- id = tp_asv_get_string (properties,
- TP_IFACE_CHANNEL ".TargetID");
- if (id == NULL)
- return;
+ handle_type = tp_asv_get_uint32 (properties,
+ TP_IFACE_CHANNEL ".TargetHandleType", NULL);
- channel = tp_channel_new_from_properties (conn, path,
- properties, NULL);
- got_list_channel (list, channel);
- g_object_unref (channel);
+ if (handle_type == TP_HANDLE_TYPE_LIST) {
+ channel = tp_channel_new_from_properties (conn, path,
+ properties, NULL);
+ got_list_channel (list, channel);
+ g_object_unref (channel);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]