flawed representation of contact caps (can't deal with clients going away?)
Submitted by Simon McVittie
Assigned to Simon McVittie
Description
Gabble represents contact caps like this:
- Connection maintains a table { client name => caps set }
- When a new client appears, every channel manager is asked to "represent" that client, building up a list of caps that is the union of each channel manager's representation
- The caps emitted onto the network are the union of all clients' capabilities
- When a client goes away, it is removed from the table and the union is re-calculated
Salut, by contrast, does this:
- When a new client appears, every channel manager is asked to "represent" that client, storing the representation internally; it then emits the union of every client it cares about, including ones it isn't currently trying to represent
I'm not sure whether this deals correctly with clients going away.
It certainly requires more subtlety from channel managers than they ought to have (see Ytstenut's plugin-base/caps-manager.c, and a Yts bug I'm about to file).
Fixing this will break out-of-tree channel managers. The one in ytstenut-plugins is the only known example.