diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-30 20:48:30 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-08 18:34:57 +0800 |
commit | 8a83a0fed90f5ad0061e1cf7aae573139f314206 (patch) | |
tree | 33dc6719889c322341f67592ce48720a0741ef5e /libempathy | |
parent | 08a935de1ab0f4f63b8d2c7704d1ebf98b228a65 (diff) | |
download | gsoc2013-empathy-8a83a0fed90f5ad0061e1cf7aae573139f314206.tar gsoc2013-empathy-8a83a0fed90f5ad0061e1cf7aae573139f314206.tar.gz gsoc2013-empathy-8a83a0fed90f5ad0061e1cf7aae573139f314206.tar.bz2 gsoc2013-empathy-8a83a0fed90f5ad0061e1cf7aae573139f314206.tar.lz gsoc2013-empathy-8a83a0fed90f5ad0061e1cf7aae573139f314206.tar.xz gsoc2013-empathy-8a83a0fed90f5ad0061e1cf7aae573139f314206.tar.zst gsoc2013-empathy-8a83a0fed90f5ad0061e1cf7aae573139f314206.zip |
new_channels_cb: don't early return if TargetHandleType != TP_HANDLE_TYPE_LIST
Diffstat (limited to 'libempathy')
-rw-r--r-- | 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 39892132b..cce5f8e1e 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); + } } } |