Bug 28287 - ContactInfoChanged is emitted 2 times in response to RefreshContactInfo
Summary: ContactInfoChanged is emitted 2 times in response to RefreshContactInfo
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/jo...
Whiteboard: review+ish
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-05-27 17:30 UTC by Xavier Claessens
Modified: 2011-02-02 08:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Xavier Claessens 2010-05-27 17:30:10 UTC
When I call RefreshContactInfo, gabble emits ContactInfoChanged 2 times once the vcard is retrieved.
Comment 1 Jonny Lamb 2011-01-17 06:28:06 UTC
What do you think of this then?
Comment 2 Xavier Claessens 2011-01-17 06:34:36 UTC
I never worked on that code, but it seems to make sense :)
Comment 3 Will Thompson 2011-02-02 08:28:55 UTC
+    # ContactInfoChanged should not be signalled again
+    forbidden = [EventPattern('dbus-signal', signal='ContactInfoChanged')]
+    q.forbid_events(forbidden)
+
     # Refresh the contact info again; gabble should contact the server again
     call_async(q, conn.ContactInfo, 'RefreshContactInfo', [handle])
 
     event = q.expect('stream-iq', to='bob@foo.com', query_ns='vcard-temp',
         query_name='vCard')
 
+    sync_dbus(bus, q, conn)
+
+    q.unforbid_events(forbidden)


I think you can put the sync_dbus() call and unforbid thing above the call_async, no?

But it basically looks fine.
Comment 4 Jonny Lamb 2011-02-02 08:38:00 UTC
(In reply to comment #3)
> I think you can put the sync_dbus() call and unforbid thing above the
> call_async, no?

I deliberately wanted the unforbid_events to be quite late the signal never should have been fired again. I'm going to merge it as is. Thanks!


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.