After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712839 - Remove empathy_create_individual_from_tp_contact()
Remove empathy_create_individual_from_tp_contact()
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Meta Contacts
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-21 19:32 UTC by Philip Withnall
Modified: 2013-11-25 10:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libempathy: Remove empathy_create_individual_from_tp_contact() (4.17 KB, patch)
2013-11-21 19:33 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2013-11-21 19:32:39 UTC
We should use empathy_ensure_individual_from_tp_contact() instead, to avoid the situation where a TpfPersona which already has a non-NULL individual is added to a new individual. That was causing crashes in empathy-chat on IRC channels if (I think) someone changed their IRC nick part-way through empathy-chat enumerating and relinking all the personas.

See https://bugzilla.redhat.com/show_bug.cgi?id=1031252
Comment 1 Philip Withnall 2013-11-21 19:33:00 UTC
Created attachment 260481 [details] [review]
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
Comment 2 Guillaume Desmottes 2013-11-25 10:34:17 UTC
Review of attachment 260481 [details] [review]:

++

I think this is safe enough for 3.10.

thanks!
Comment 3 Philip Withnall 2013-11-25 10:52:08 UTC
Pushed to master:

commit 0909d1f884c4542553d98b18e7622664d2a02169
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Thu Nov 21 18:09:16 2013 +0000

    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

 libempathy-gtk/empathy-contact-chooser.c          |  2 +-
 libempathy-gtk/empathy-individual-menu.c          |  2 +-
 libempathy-gtk/empathy-individual-store-channel.c |  2 +-
 libempathy/empathy-utils.c                        | 20 --------------------
 libempathy/empathy-utils.h                        |  3 ---
 5 files changed, 3 insertions(+), 26 deletions(-)

and to 3.10:

commit 96f2a474e0cdc5f8fe8a482d14a1a97c519def3a
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Thu Nov 21 18:09:16 2013 +0000

    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

 libempathy-gtk/empathy-contact-chooser.c          |  2 +-
 libempathy-gtk/empathy-individual-menu.c          |  2 +-
 libempathy-gtk/empathy-individual-store-channel.c |  2 +-
 libempathy/empathy-utils.c                        | 20 --------------------
 libempathy/empathy-utils.h                        |  3 ---
 5 files changed, 3 insertions(+), 26 deletions(-)