Bug 21093 - Approver: AddDispatchOperation assumes CDO.Channels is immutable
Summary: Approver: AddDispatchOperation assumes CDO.Channels is immutable
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Keywords: patch
Depends on:
Blocks: 21148 21174
  Show dependency treegraph
Reported: 2009-04-07 12:58 UTC by Simon McVittie
Modified: 2009-04-14 07:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Simon McVittie 2009-04-07 12:58:56 UTC
The Channels property on ChannelDispatchOperation objects is mutable (channels can fall off). However, AddDispatchOperation documentation implies that it is immutable.

We should separate the Channels into a separate argument, and document the inherent race conditions. For reference, those races are:

* channels that close immediately after AddDispatchOperation go bad - the approver should call a method on the channel (i.e. make a TpChannel) to notice whether they're dead or not

* channels that close immediately after HandleChannels is called - the handler should do the same
Comment 1 Simon McVittie 2009-04-10 10:53:33 UTC
Discussion with Rob resulted in this proposal:

* CDOs' Channels property remains mutable
* CDOs aren't allowed to emit ChannelLost or Finished until all approvers have returned from AddDispatchOperation (they should queue up the signals for later sending if necessary)
* As a result, Approvers 
* Non-Approvers that are somehow given a CDO's object path (i.e. mostly Observers) are required to connect to ChannelLost, connect to Finished and GetAll(), as per the usual connect-signals-before-state-recovery doctrine

I'll spec it up on Monday.
Comment 2 Will Thompson 2009-04-11 02:29:14 UTC
(In reply to comment #1)
> * As a result, Approvers 

This sentence doesn't seem to
Comment 3 Simon McVittie 2009-04-13 07:45:05 UTC
Should have been:

* As a result, Approvers may assume that Channels stays constant at least until they return from ADO, so they have time to connect to ChannelLost
Comment 5 Simon McVittie 2009-04-13 10:14:56 UTC
Yes (specmeet)
Comment 6 Simon McVittie 2009-04-14 07:59:55 UTC
Fixed in git, will be in 0.17.23, MC needs to catch up (Bug #21174)

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.