Bug 55392

Summary: _mcd_channel_depart doesn't Close() channels that turn out not to be a Group
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: mission-controlAssignee: Simon McVittie <smcv>
Status: RESOLVED DUPLICATE QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: guillaume.desmottes, jonny.lamb, xclaesse
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
URL: http://cgit.freedesktop.org/~smcv/telepathy-mission-control/log/?h=512-really-depart
Whiteboard: review?
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 55391    
Attachments: _mcd_channel_depart: if it turns out not to implement GROUP, close it

Description Simon McVittie 2012-09-27 17:33:46 UTC
Pseudocode for how _mcd_channel_depart() should work:

    if we know whether it's a Group already:
        if it is:
            try:
                leave
            except:
                close
        else:
            close
    else:
        find out
        if it is:
            try:
                leave
            except:
                close
        else:            # <--
            close        # <--

(where, in all cases, "close" ignores errors).

In fact, the last two lines are missing. If we didn't already know whether it was a Group, but it turns out not to be, we don't close it.
Comment 1 Simon McVittie 2012-09-27 17:34:44 UTC
Created attachment 67777 [details] [review]
_mcd_channel_depart: if it turns out not to implement GROUP,  close it

This is a long-standing bug (broken ever since the function was
introduced in 5.2), but apparently nobody noticed.
Comment 2 Simon McVittie 2012-09-27 17:46:22 UTC
The patch is against 5.12, but given that this has been broken for so long and nobody cared or indeed noticed, I'd be equally happy to fix this in the upcoming 5.14.0, or in 5.15.
Comment 3 Simon McVittie 2013-01-09 12:02:10 UTC
(In reply to comment #2)
> The patch is against 5.12, but given that this has been broken for so long
> and nobody cared or indeed noticed, I'd be equally happy to fix this in the
> upcoming 5.14.0, or in 5.15.

5.14 is no longer upcoming. The same still stands.
Comment 4 Guillaume Desmottes 2013-09-10 08:06:22 UTC
Couldn't we use tp_channel_leave_async?
Comment 5 Simon McVittie 2013-09-10 10:25:16 UTC
I already answered that on Bug #55391 so let's discuss there.

*** This bug has been marked as a duplicate of bug 55391 ***

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.