]> git.0d.be Git - empathy.git/commitdiff
Simplify how channel classes value is parsed. Fixes bug #577825
authorXavier Claessens <xclaesse@gmail.com>
Fri, 3 Apr 2009 12:50:08 +0000 (12:50 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 3 Apr 2009 12:50:08 +0000 (12:50 +0000)
From: Xavier Claessens <xclaesse@gmail.com>

svn path=/trunk/; revision=2759

libempathy/empathy-tp-contact-factory.c

index d83ba12a8ce146203497f4e86d664272c96ddb09..f72cc77d19c38b0b263180fb08bb0f6601515323 100644 (file)
@@ -840,17 +840,13 @@ get_requestable_channel_classes_cb (TpProxy *connection,
 
        classes = g_value_get_boxed (value);
        for (i = 0; i < classes->len; i++) {
 
        classes = g_value_get_boxed (value);
        for (i = 0; i < classes->len; i++) {
-               GValue class = {0,};
-               GValue *chan_type, *handle_type;
+               GValueArray *class_struct;
                GHashTable *fixed_prop;
                GHashTable *fixed_prop;
+               GValue *chan_type, *handle_type;
                GList *l;
 
                GList *l;
 
-               g_value_init (&class, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS);
-               g_value_set_static_boxed (&class, g_ptr_array_index (classes, i));
-
-               dbus_g_type_struct_get (&class,
-                                       0, &fixed_prop,
-                                       G_MAXUINT);
+               class_struct = g_ptr_array_index (classes, i);
+               fixed_prop = g_value_get_boxed (g_value_array_get_nth (class_struct, 0));
 
                chan_type = g_hash_table_lookup (fixed_prop,
                        TP_IFACE_CHANNEL ".ChannelType");
 
                chan_type = g_hash_table_lookup (fixed_prop,
                        TP_IFACE_CHANNEL ".ChannelType");