Bug 19134 - should return from all relevant Create/Ensure calls before emitting NewChannels
Summary: should return from all relevant Create/Ensure calls before emitting NewChannels
Status: RESOLVED NOTABUG
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-17 03:31 UTC by Will Thompson
Modified: 2009-04-03 04:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.