Bug 25181 - tp_connection_get_contacts_by_handle always calls GetContactAttributes
Summary: tp_connection_get_contacts_by_handle always calls GetContactAttributes
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-11-19 03:40 UTC by Guillaume Desmottes
Modified: 2009-11-23 03:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2009-11-19 03:40:53 UTC
Original Empathy bug report: https://bugzilla.gnome.org/show_bug.cgi?id=602328

To reproduce:
- start a chat with a contact using Empathy and launch dbus-monitor
- start typing in the chat window: GetContactAttributes () is called
- wait a bit that Empathy's typing timer times out: GetContactAttributes () is called again
- start typing again: GetContactAttributes () is called
- etc.

That's because each time the ChatStateChanged signal is fired, Empathy calls tp_connection_get_contacts_by_handle() to get the TpContact object associated with the signal. As Empathy already keep a ref on this TpContact, tp-glib is supposed to return the existing contact object (which it does, pointers are the same) but it still makes a call to GetContactAttributes ().
It shouldn't call this function when re-using an existing contact object as this leads to useless D-Bus round trips.

Note that if you are using a released Empathy version, you'll see 2 calls of GetContactAttributes(). That's because Empathy was handling the ChatStateChanged twice. This has been fixed in master and gnome-2.28.
Comment 1 David Laban 2009-11-20 14:19:41 UTC
That really shouldn't have taken me so long. Done now though.

http://git.collabora.co.uk/?p=user/alsuren/telepathy-glib.git;a=shortlog;h=refs/heads/fix-25181
Comment 2 David Laban 2009-11-23 03:41:47 UTC
fix merged


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.