]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-tp-contact-list.c
Simplify expression in tp_contact_list_group_add_data_unref
[empathy.git] / libempathy / empathy-tp-contact-list.c
index a0b40b026fae6d205a4b47e8d1f2bdfd0eb44dc8..a4d91be1d0b378744a78d93bbb328ba0fe43abbe 100644 (file)
@@ -228,7 +228,8 @@ tp_contact_list_group_add_data_unref (gpointer user_data)
 {
        GroupAddData *data = user_data;
 
-       if (--data->ref_count == 0) {
+       data->ref_count--;
+       if (data->ref_count == 0) {
                g_array_free (data->handles, TRUE);
                g_slice_free (GroupAddData, data);
        }
@@ -877,6 +878,11 @@ tp_contact_list_add (EmpathyContactList *list,
                tp_cli_channel_interface_group_call_add_members (priv->subscribe,
                        -1, &handles, message, NULL, NULL, NULL, NULL);
        }
+       if (priv->publish &&
+           g_hash_table_lookup (priv->pendings, GUINT_TO_POINTER (handle))) {
+               tp_cli_channel_interface_group_call_add_members (priv->publish,
+                       -1, &handles, message, NULL, NULL, NULL, NULL);
+       }
 }
 
 static void