Bug 39136 - Reset contact capabilities when gnome-shell is restarted
Summary: Reset contact capabilities when gnome-shell is restarted
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (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: 2011-07-11 06:15 UTC by Guillaume Desmottes
Modified: 2019-12-03 19:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2011-07-11 06:15:50 UTC
Each time I restart gnome-shell (and I have to restart it a lot), MC calls UpdateCapabilities() on Gabble with only the Shell as client. As a result, Gabble loses track of empathy-call and creates SM channel instead of Call ones.
Comment 1 Will Thompson 2011-07-11 06:31:10 UTC
My understanding of this method was that it's Update() not Set(), so MC is behaving correctly.

The spec isn't clear on this point <http://telepathy.freedesktop.org/spec/Connection_Interface_Contact_Capabilities.html#Method:UpdateCapabilities>: the argument's definition suggests my reading, and the body suggests your reading. Joy.
Comment 2 Guillaume Desmottes 2011-07-11 06:48:02 UTC
Humm UpdateCapabilities() is an *update* and not a *set*, so I think MC fine. But then why is Gabble reseting (gabble_caps_channel_manager_reset_capabilities()) all capabilities each time UpdateCapabilities() is called on it?
Comment 3 Simon McVittie 2011-07-11 06:57:13 UTC
I intended it to behave as the argument's description says (Update, not Set, semantics), which would mean that this is a Gabble bug (it should assume that every client not mentioned by MC is still the same as it used to be). I'm reasonably sure that I implemented it that way in Gabble, too, but perhaps the Call support detection (which was added later) doesn't follow that?

This sentence in the spec is misleading:

> Alter the connection's advertised capabilities to include the intersection
> of the given clients' capabilities with what the connection manager is able
> to implement.

Perhaps a better wording would be:

    Record that the given clients have the given capabilities, then
    alter the connection's advertised capabilities to be the union
    of the capabilities of all clients, including any clients mentioned
    in previous calls to this method, but omitting any capabilities that
    the connection manager is unable to implement.
Comment 4 Simon McVittie 2011-07-11 06:59:41 UTC
(In reply to comment #2)
> But then why is Gabble reseting
> (gabble_caps_channel_manager_reset_capabilities()) all capabilities each time
> UpdateCapabilities() is called on it?

If it iterates through all clients after doing that, including clients from previous calls, then that'd be fine.

Pseudocode:

    reset (remove all) caps
    add the new caps for Shell
    add the old caps for empathy-call
Comment 5 Guillaume Desmottes 2011-07-11 07:48:29 UTC
(In reply to comment #3)
> Perhaps a better wording would be:
> 
>     Record that the given clients have the given capabilities, then
>     alter the connection's advertised capabilities to be the union
>     of the capabilities of all clients, including any clients mentioned
>     in previous calls to this method, but omitting any capabilities that
>     the connection manager is unable to implement.

Sounds good to me.

Re-assigning to Gabble then.
Comment 6 GitLab Migration User 2019-12-03 19:53:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-gabble/issues/165.


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.