Bug 19134

Summary: should return from all relevant Create/Ensure calls before emitting NewChannels
Product: Telepathy Reporter: Will Thompson <will>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED NOTABUG QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2008-12-17 03:31:28 UTC
If two calls to ChannelDispatcher.EnsureChannel are made, both satisfied by the same channel, the handler would ideally receive a single HandleChannels() call listing those two channel requests rather than two calls.  This depends on the CM responding as follows to the two EnsureChannel calls:

CD -> CM     EnsureChannel[1]
CD -> CM     EnsureChannel[2]
CD <- CM     1 returns
CD <- CM     2 returns
   <- CM ->  NewChannels

Under the current implementation, this *should* work when the CM returns from EnsureChannel asynchronously, but this should be verified; when it returns synchronously, it cannot work because call 2 does not arrive at the CM until after it's emitted NewChannels, so the CD must call HandleChannels twice.

Perhaps TpChannelManager should emit NewChannels in an idle callback to give the second EnsureChannel call a chance to arrive and be processed?
Comment 1 Alban Crequy 2008-12-17 04:04:13 UTC
Do you have a use case where this bug actually matters?
Comment 2 Will Thompson 2008-12-17 04:14:10 UTC
Not really. It just means the channel dispatcher has code for a situation which rarely happens, and handlers had better get used to getting multiple HandleChannels calls.
Comment 3 Will Thompson 2009-04-03 04:19:21 UTC
Alban's right. This isn't a bug.

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.