Bug 23687

Summary: Doesn't deal correctly with all BypassApproval handlers exiting
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: mission-controlAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: high Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/smcv/telepathy-mission-control-smcv.git;a=shortlog;h=refs/heads/limit-approval-bypass
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 23818, 24120, 24569    
Bug Blocks: 23651    

Description Simon McVittie 2009-09-03 07:40:20 UTC
At the moment, it's possible to get MC into this situation:

* NewChannels
* a handler H0 with BypassApproval=FALSE exists
* a handler H1 with BypassApproval=TRUE exists
* MC decides to bypass approvers
* H1 exits
* MC runs handlers
* H1 doesn't exist any more
* H0 is run without approval

or even this:

* NewChannels
* a handler H0 with BypassApproval=FALSE exists
* a handler H1 with BypassApproval=TRUE exists
* MC decides to bypass approvers
* H1 exits, but MC hasn't seen it disappear yet
* MC runs handlers
* H1 is run; calling its HandleChannels method fails
* Only now does MC see that H1 has exited
* H0 is run without approval

We should convert dispatching to have an extra phase: before running approvers, try to run BypassApproval handlers in preference order. If one of them succeeds, stop dispatching; if they all fail (or there aren't any), continue to approvers.

This is likely to require refactoring in the dispatcher code, and is probably too intrusive for 5.2.
Comment 1 Simon McVittie 2009-10-16 04:47:06 UTC
Now that I've done the refactoring (although it still needs review), this is the next highest priority.
Comment 2 Simon McVittie 2009-10-19 16:48:52 UTC
This should now be good to review after Bug #24120 and Bug #24569.
Comment 3 Sjoerd Simons 2009-11-02 07:38:16 UTC
ship it
Comment 4 Simon McVittie 2009-11-02 07:58:54 UTC
Thanks, fixed in git

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.