diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-11-22 02:09:16 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-11-25 18:50:04 +0800 |
commit | 0909d1f884c4542553d98b18e7622664d2a02169 (patch) | |
tree | e6f563f4e3504ce89908ca977d2762b5cf1230d6 | |
parent | 561774b13b402c3f33b5264efc5abd091aa563cf (diff) | |
download | gsoc2013-empathy-0909d1f884c4542553d98b18e7622664d2a02169.tar gsoc2013-empathy-0909d1f884c4542553d98b18e7622664d2a02169.tar.gz gsoc2013-empathy-0909d1f884c4542553d98b18e7622664d2a02169.tar.bz2 gsoc2013-empathy-0909d1f884c4542553d98b18e7622664d2a02169.tar.lz gsoc2013-empathy-0909d1f884c4542553d98b18e7622664d2a02169.tar.xz gsoc2013-empathy-0909d1f884c4542553d98b18e7622664d2a02169.tar.zst gsoc2013-empathy-0909d1f884c4542553d98b18e7622664d2a02169.zip |
libempathy: Remove empathy_create_individual_from_tp_contact()
It has been replaced by empathy_ensure_individual_from_tp_contact(),
which can’t cause internal state corruption in libfolks by wrapping an
existing Persona in a second Individual when it’s already wrapped in
one.
This has also been fixed in libfolks.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1031252
https://bugzilla.gnome.org/show_bug.cgi?id=712839
-rw-r--r-- | libempathy-gtk/empathy-contact-chooser.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-menu.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-store-channel.c | 2 | ||||
-rw-r--r-- | libempathy/empathy-utils.c | 20 | ||||
-rw-r--r-- | libempathy/empathy-utils.h | 3 |
5 files changed, 3 insertions, 26 deletions
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c index e31b22fe1..b82aa93a1 100644 --- a/libempathy-gtk/empathy-contact-chooser.c +++ b/libempathy-gtk/empathy-contact-chooser.c @@ -232,7 +232,7 @@ get_contacts_cb (GObject *source, /* another request has been started */ goto out; - individual = empathy_create_individual_from_tp_contact (contact); + individual = empathy_ensure_individual_from_tp_contact (contact); if (individual == NULL) goto out; diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c index b7b0abe86..7f53a7a83 100644 --- a/libempathy-gtk/empathy-individual-menu.c +++ b/libempathy-gtk/empathy-individual-menu.c @@ -164,7 +164,7 @@ individual_menu_add_personas (EmpathyIndividualMenu *self, goto while_finish; contact = empathy_contact_dup_from_tp_contact (tp_contact); - single_individual = empathy_create_individual_from_tp_contact ( + single_individual = empathy_ensure_individual_from_tp_contact ( tp_contact); /* Pretty hacky. Creating single_individual had a side effect to change diff --git a/libempathy-gtk/empathy-individual-store-channel.c b/libempathy-gtk/empathy-individual-store-channel.c index 4064da054..a18bc33de 100644 --- a/libempathy-gtk/empathy-individual-store-channel.c +++ b/libempathy-gtk/empathy-individual-store-channel.c @@ -70,7 +70,7 @@ add_members (EmpathyIndividualStoreChannel *self, if (g_hash_table_lookup (self->priv->individuals, contact) != NULL) continue; - individual = empathy_create_individual_from_tp_contact (contact); + individual = empathy_ensure_individual_from_tp_contact (contact); if (individual == NULL) return; diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 4130627e7..e83493736 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -946,26 +946,6 @@ create_individual_from_persona (FolksPersona *persona) return individual; } -FolksIndividual * -empathy_create_individual_from_tp_contact (TpContact *contact) -{ - TpfPersona *persona; - FolksIndividual *individual; - - persona = tpf_persona_dup_for_contact (contact); - if (persona == NULL) - { - DEBUG ("Failed to get a persona for %s", - tp_contact_get_identifier (contact)); - return NULL; - } - - individual = create_individual_from_persona (FOLKS_PERSONA (persona)); - - g_object_unref (persona); - return individual; -} - /* Look for a FolksIndividual containing @contact as one of his persona * and create one if needed */ FolksIndividual * diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h index 40291b971..a9ff0d890 100644 --- a/libempathy/empathy-utils.h +++ b/libempathy/empathy-utils.h @@ -102,9 +102,6 @@ void empathy_individual_can_audio_video_call (FolksIndividual *individual, gboolean empathy_client_types_contains_mobile_device ( const GStrv types); -FolksIndividual * empathy_create_individual_from_tp_contact ( - TpContact *contact); - FolksIndividual * empathy_ensure_individual_from_tp_contact ( TpContact *contact); |