[Telepathy] Get existing connection in clients

Xavier Claessens xclaesse at gmail.com
Sun Feb 11 02:49:59 PST 2007

On jeu, 2007-02-08 at 12:04 +0100, Xavier Claessens wrote:
> Ok so finally what can be done here ?!?
> I need this problem fixed because it currently prevent gossip to connect
> multiple IRC server. The problem is gossip reuse an existing connection
> if the "account" parameter is the same, which is wrong for irc account!
> Here is what I suggest:
> RequestConnection should return an existing connection. The CM is the
> only responsible of the dbus path naming and clients don't know how to
> make a unique dbus name. So the CM takes parameters, create a dbus path
> and checks if it already exists. If it doesn't exists it creates it and
> return the new dbus object, otherwise it just return the existing
> object. This should be done in this method and not in another because,
> with another function like GetExistingConnection, we can call it and see
> there is no other connection, another client request a new connection
> with same parameters, then the first client request a new connection too
> and get an error because the dbus object already exists even if he just
> checked there is no existing connection.
> Once the client gets a connection using RequestConnection it checks his
> status. If it's not DISCONNECTED it means an existing connection was
> returned, the client should check if the existing connection is good to
> be reused. It needs a function like GetParameters on
> org.freedesktop.Telepathy.Connection to get parameters used for this
> connection, the client can maybe decide this connections can't be reused
> because the user wants SSL enabled and the existing connection doesn't
> have ssl. If the connection can't be reused the client disconnect it and
> request a new one. If the connection can be reused the client should
> request opened channels, etc.
> Comments welcomed.

UP! No comments? Gossip really needs a solution...

More information about the Telepathy mailing list